From 1afda474301754a095c55497aaee1fd038a8dcd0 Mon Sep 17 00:00:00 2001
From: Jakub Hrozek <jhrozek@redhat.com>
Date: Fri, 17 Oct 2014 17:31:31 +0200
Subject: [PATCH 39/46] PAC: Run the pac responder as the SSSD user
Reviewed-by: Pavel Reichl <preichl@redhat.com>
Reviewed-by: Simo Sorce <simo@redhat.com>
(cherry picked from commit 22f4bcbb211bf800af647ad1fc9595a8020a6fe6)
---
src/monitor/monitor.c | 3 ++-
src/responder/pac/pacsrv.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/monitor/monitor.c b/src/monitor/monitor.c
index 4e461aa78e47ec6cedb77dd030f72c273a00a495..61a9f0b849a460da88b393b4f08795fb7a571886 100644
--- a/src/monitor/monitor.c
+++ b/src/monitor/monitor.c
@@ -1064,7 +1064,8 @@ static bool svc_supported_as_nonroot(const char *svc_name)
{
if ((strcmp(svc_name, "nss") == 0)
|| (strcmp(svc_name, "pam") == 0)
- || (strcmp(svc_name, "autofs") == 0)) {
+ || (strcmp(svc_name, "autofs") == 0)
+ || (strcmp(svc_name, "pac") == 0)) {
return true;
}
return false;
diff --git a/src/responder/pac/pacsrv.c b/src/responder/pac/pacsrv.c
index e427cd756f4031218a8fb99c30bf709e21680039..3eb21c8fff85343249494bcc06d97cda4b738034 100644
--- a/src/responder/pac/pacsrv.c
+++ b/src/responder/pac/pacsrv.c
@@ -247,7 +247,8 @@ int main(int argc, const char *argv[])
/* set up things like debug, signals, daemonization, etc... */
debug_log_file = "sssd_pac";
- ret = server_setup("sssd[pac]", 0, 0, 0, CONFDB_PAC_CONF_ENTRY, &main_ctx);
+ ret = server_setup("sssd[pac]", 0, uid, gid,
+ CONFDB_PAC_CONF_ENTRY, &main_ctx);
if (ret != EOK) return 2;
ret = die_if_parent_died();
--
1.9.3