summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2014-10-17 17:30:07 +0200
committerJakub Hrozek <jhrozek@redhat.com>2014-10-22 15:44:46 +0200
commit287cc55b9086dd3c4e2a5fb84784e09767860142 (patch)
tree109b430041ebf1c3298a02fffb9af394d8d8773d
parent4e1892cdfcc5300d6632200c38ba67f2783d15f2 (diff)
downloadsssd-287cc55b9086dd3c4e2a5fb84784e09767860142.tar.gz
sssd-287cc55b9086dd3c4e2a5fb84784e09767860142.tar.xz
sssd-287cc55b9086dd3c4e2a5fb84784e09767860142.zip
AUTOFS: Run the autofs responder as the SSSD user
Reviewed-by: Pavel Reichl <preichl@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com>
-rw-r--r--src/monitor/monitor.c3
-rw-r--r--src/responder/autofs/autofssrv.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/monitor/monitor.c b/src/monitor/monitor.c
index 2f622e571..4e461aa78 100644
--- a/src/monitor/monitor.c
+++ b/src/monitor/monitor.c
@@ -1063,7 +1063,8 @@ static errno_t get_ping_config(struct mt_ctx *ctx, const char *path,
static bool svc_supported_as_nonroot(const char *svc_name)
{
if ((strcmp(svc_name, "nss") == 0)
- || (strcmp(svc_name, "pam") == 0)) {
+ || (strcmp(svc_name, "pam") == 0)
+ || (strcmp(svc_name, "autofs") == 0)) {
return true;
}
return false;
diff --git a/src/responder/autofs/autofssrv.c b/src/responder/autofs/autofssrv.c
index 12a7a777e..44474ee08 100644
--- a/src/responder/autofs/autofssrv.c
+++ b/src/responder/autofs/autofssrv.c
@@ -238,7 +238,7 @@ int main(int argc, const char *argv[])
/* set up things like debug, signals, daemonization, etc... */
debug_log_file = "sssd_autofs";
- ret = server_setup("sssd[autofs]", 0, 0, 0,
+ ret = server_setup("sssd[autofs]", 0, uid, gid,
CONFDB_AUTOFS_CONF_ENTRY, &main_ctx);
if (ret != EOK) {
return 2;