From 695bca9d2f73096254308e0883fcc74b2631850e Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Thu, 19 Jul 2012 15:50:52 -0400 Subject: NSS: Add override_shell option If override_shell is specified in the [nss] section, all users managed by SSSD will have their shell set to this value. If it is specified in the [domain/DOMAINNAME] section, it will apply to only that domain (and override the [nss] value, if any). https://fedorahosted.org/sssd/ticket/1087 --- src/confdb/confdb.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/confdb/confdb.c') diff --git a/src/confdb/confdb.c b/src/confdb/confdb.c index ab0d00480..37a5758c7 100644 --- a/src/confdb/confdb.c +++ b/src/confdb/confdb.c @@ -1064,6 +1064,16 @@ static int confdb_get_domain_internal(struct confdb_ctx *cdb, } } + tmp = ldb_msg_find_attr_as_string(res->msgs[0], + CONFDB_NSS_OVERRIDE_SHELL, NULL); + if (tmp != NULL) { + domain->override_shell = talloc_strdup(domain, tmp); + if (!domain->override_shell) { + ret = ENOMEM; + goto done; + } + } + ret = get_entry_as_bool(res->msgs[0], &domain->case_sensitive, CONFDB_DOMAIN_CASE_SENSITIVE, true); if(ret != EOK) { -- cgit