From ac40d2f2b2b2fc35c95389f5e28febd580bd2b7a Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Mon, 6 Oct 2014 16:28:13 +0200 Subject: SSSD: Add the options to specify a UID and GID to run as Adds new command line options --uid and --gid to all SSSD servers, making it possible to switch to another user ID if needed. So far all code still runs as root. Reviewed-by: Pavel Reichl --- src/providers/proxy/proxy_child.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/providers/proxy') diff --git a/src/providers/proxy/proxy_child.c b/src/providers/proxy/proxy_child.c index 6bee1c7f6..e261b2f58 100644 --- a/src/providers/proxy/proxy_child.c +++ b/src/providers/proxy/proxy_child.c @@ -504,10 +504,13 @@ int main(int argc, const char *argv[]) int ret; long id; char *pam_target = NULL; + uid_t uid; + gid_t gid; struct poptOption long_options[] = { POPT_AUTOHELP SSSD_MAIN_OPTS + SSSD_SERVER_OPTS(uid, gid) {"domain", 0, POPT_ARG_STRING, &domain, 0, _("Domain of the information provider (mandatory)"), NULL }, {"id", 0, POPT_ARG_LONG, &id, 0, @@ -557,7 +560,7 @@ int main(int argc, const char *argv[]) conf_entry = talloc_asprintf(NULL, CONFDB_DOMAIN_PATH_TMPL, domain); if (!conf_entry) return 2; - ret = server_setup(srv_name, 0, conf_entry, &main_ctx); + ret = server_setup(srv_name, 0, 0, 0, conf_entry, &main_ctx); if (ret != EOK) { DEBUG(SSSDBG_FATAL_FAILURE, "Could not set up mainloop [%d]\n", ret); return 2; -- cgit