summaryrefslogtreecommitdiffstats
path: root/saslauthd
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-07-11 14:07:13 +0100
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-07-11 14:07:13 +0100
commita182a939513865cf94d65c2a6dbb449be834a440 (patch)
tree86c4a72a431da4278ec96c2db477780f4e8b90d3 /saslauthd
parent569f7874038253f407d1414a696974dd5d6e8991 (diff)
downloadpykolab-a182a939513865cf94d65c2a6dbb449be834a440.tar.gz
Add command-line options for the targeted process username and group name
Diffstat (limited to 'saslauthd')
-rw-r--r--saslauthd/__init__.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/saslauthd/__init__.py b/saslauthd/__init__.py
index b5c4f4d..93b994e 100644
--- a/saslauthd/__init__.py
+++ b/saslauthd/__init__.py
@@ -59,6 +59,26 @@ class SASLAuthDaemon(object):
default = "/var/run/kolab-saslauthd/kolab-saslauthd.pid",
help = _("Path to the PID file to use."))
+ daemon_group.add_option(
+ "-u",
+ "--user",
+ dest = "process_username",
+ action = "store",
+ default = "kolab",
+ help = _("Run as user USERNAME"),
+ metavar = "USERNAME"
+ )
+
+ daemon_group.add_option(
+ "-g",
+ "--group",
+ dest = "process_groupname",
+ action = "store",
+ default = "kolab",
+ help = _("Run as group GROUPNAME"),
+ metavar = "GROUPNAME"
+ )
+
conf.finalize_conf()
utils.ensure_directory(