summaryrefslogtreecommitdiffstats
path: root/saslauthd/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'saslauthd/__init__.py')
-rw-r--r--saslauthd/__init__.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/saslauthd/__init__.py b/saslauthd/__init__.py
index 6daebf3..1497dda 100644
--- a/saslauthd/__init__.py
+++ b/saslauthd/__init__.py
@@ -60,6 +60,12 @@ class SASLAuthDaemon(object):
conf.finalize_conf()
+ utils.ensure_directory(
+ os.path.dirname(conf.pidfile),
+ conf.process_username,
+ conf.process_groupname
+ )
+
self.thread_count = 0
def run(self):
@@ -116,6 +122,12 @@ class SASLAuthDaemon(object):
s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
+ utils.ensure_directory(
+ '/var/run/saslauthd/',
+ conf.process_username,
+ conf.process_groupname
+ )
+
# TODO: The saslauthd socket path could be a setting.
try:
os.remove('/var/run/saslauthd/mux')