summaryrefslogtreecommitdiffstats
path: root/saslauthd
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-06-13 11:37:40 +0100
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-06-13 11:37:40 +0100
commite3d33d10fbdbf362b89476fbdab6c7a6ca0a45fb (patch)
tree9e933fbf43b7aa1f4351590baa173d03d6d3bf0a /saslauthd
parent1df64e63556db23be0d701ca10c4fd35f87f9aec (diff)
downloadpykolab-e3d33d10fbdbf362b89476fbdab6c7a6ca0a45fb.tar.gz
Make use of the new ensure_directory() function (#840)
Diffstat (limited to 'saslauthd')
-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')