summaryrefslogtreecommitdiff
path: root/src/confdb
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2012-10-17 14:43:07 +0200
committerJakub Hrozek <jhrozek@redhat.com>2012-10-18 20:19:33 +0200
commit66318dfe1e7138ff3fc780c4b3f0b29c4b2d8712 (patch)
tree0ae1709db5b7c491795cd33d8d4b8ed81366a4f7 /src/confdb
parentd9b1ecd81527640e5c15e6617e981a14ead9419f (diff)
downloadsssd-66318dfe1e7138ff3fc780c4b3f0b29c4b2d8712.tar.gz
sssd-66318dfe1e7138ff3fc780c4b3f0b29c4b2d8712.tar.bz2
sssd-66318dfe1e7138ff3fc780c4b3f0b29c4b2d8712.zip
Allow setting the default_shell option per-domain as well
https://fedorahosted.org/sssd/ticket/1583
Diffstat (limited to 'src/confdb')
-rw-r--r--src/confdb/confdb.c10
-rw-r--r--src/confdb/confdb.h1
2 files changed, 11 insertions, 0 deletions
diff --git a/src/confdb/confdb.c b/src/confdb/confdb.c
index 37a5758c..13035a41 100644
--- a/src/confdb/confdb.c
+++ b/src/confdb/confdb.c
@@ -1074,6 +1074,16 @@ static int confdb_get_domain_internal(struct confdb_ctx *cdb,
}
}
+ tmp = ldb_msg_find_attr_as_string(res->msgs[0],
+ CONFDB_NSS_DEFAULT_SHELL, NULL);
+ if (tmp != NULL) {
+ domain->default_shell = talloc_strdup(domain, tmp);
+ if (!domain->default_shell) {
+ ret = ENOMEM;
+ goto done;
+ }
+ }
+
ret = get_entry_as_bool(res->msgs[0], &domain->case_sensitive,
CONFDB_DOMAIN_CASE_SENSITIVE, true);
if(ret != EOK) {
diff --git a/src/confdb/confdb.h b/src/confdb/confdb.h
index 0e02e6cf..88e80c17 100644
--- a/src/confdb/confdb.h
+++ b/src/confdb/confdb.h
@@ -212,6 +212,7 @@ struct sss_domain_info {
const char *fallback_homedir;
const char *subdomain_homedir;
const char *override_shell;
+ const char *default_shell;
uint32_t user_timeout;
uint32_t group_timeout;