diff options
author | Jan Zeleny <jzeleny@redhat.com> | 2012-03-14 06:18:45 -0400 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2012-04-24 09:19:43 -0400 |
commit | 8ccb0de226ccb9330f5a6865de487d6f0313902d (patch) | |
tree | 7f6988948cca1599d302dea5eb83da598beda022 /src | |
parent | d1cec5a8fc58293231c72c1f967ef5421a24a33b (diff) | |
download | sssd-8ccb0de226ccb9330f5a6865de487d6f0313902d.tar.gz sssd-8ccb0de226ccb9330f5a6865de487d6f0313902d.tar.bz2 sssd-8ccb0de226ccb9330f5a6865de487d6f0313902d.zip |
New config option for subdomains
subdomain_homedir - if set, it contains default value, can be overriden
in further processing
Diffstat (limited to 'src')
-rw-r--r-- | src/confdb/confdb.c | 10 | ||||
-rw-r--r-- | src/confdb/confdb.h | 2 | ||||
-rw-r--r-- | src/man/sssd.conf.5.xml | 15 | ||||
-rw-r--r-- | src/util/domain_info_utils.c | 2 |
4 files changed, 29 insertions, 0 deletions
diff --git a/src/confdb/confdb.c b/src/confdb/confdb.c index 0320797c..fee72875 100644 --- a/src/confdb/confdb.c +++ b/src/confdb/confdb.c @@ -937,6 +937,16 @@ static int confdb_get_domain_internal(struct confdb_ctx *cdb, goto done; } + tmp = ldb_msg_find_attr_as_string(res->msgs[0], + CONFDB_DOMAIN_SUBDOMAIN_HOMEDIR, NULL); + if (tmp != NULL) { + domain->subdomain_homedir = talloc_strdup(domain, tmp); + if (!domain->subdomain_homedir) { + 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 44b334e2..78e37510 100644 --- a/src/confdb/confdb.h +++ b/src/confdb/confdb.h @@ -143,6 +143,7 @@ #define CONFDB_DOMAIN_ACCOUNT_CACHE_EXPIRATION "account_cache_expiration" #define CONFDB_DOMAIN_OVERRIDE_GID "override_gid" #define CONFDB_DOMAIN_CASE_SENSITIVE "case_sensitive" +#define CONFDB_DOMAIN_SUBDOMAIN_HOMEDIR "subdomain_homedir" #define CONFDB_DOMAIN_USER_CACHE_TIMEOUT "entry_cache_user_timeout" #define CONFDB_DOMAIN_GROUP_CACHE_TIMEOUT "entry_cache_group_timeout" @@ -188,6 +189,7 @@ struct sss_domain_info { gid_t override_gid; const char *override_homedir; + const char *subdomain_homedir; uint32_t user_timeout; uint32_t group_timeout; diff --git a/src/man/sssd.conf.5.xml b/src/man/sssd.conf.5.xml index f14d9a6f..43eb3632 100644 --- a/src/man/sssd.conf.5.xml +++ b/src/man/sssd.conf.5.xml @@ -1273,6 +1273,21 @@ </para> </listitem> </varlistentry> + + <varlistentry> + <term>subdomain_homedir (string)</term> + <listitem> + <para> + Use this homedir as default value for all subdomains + within this domain. See <emphasis>override_homedir</emphasis> + for info about possible values. + </para> + <para> + The value can be overridden by + <emphasis>override_homedir</emphasis> option. + </para> + </listitem> + </varlistentry> </variablelist> </para> diff --git a/src/util/domain_info_utils.c b/src/util/domain_info_utils.c index e66bb154..d8de790d 100644 --- a/src/util/domain_info_utils.c +++ b/src/util/domain_info_utils.c @@ -85,6 +85,8 @@ struct sss_domain_info *new_subdomain(TALLOC_CTX *mem_ctx, dom->service_timeout = parent->service_timeout; dom->override_homedir = parent->override_homedir; + dom->subdomain_homedir = parent->subdomain_homedir; + if (parent->sysdb == NULL) { DEBUG(SSSDBG_OP_FAILURE, ("Missing sysdb context in parent domain.\n")); goto fail; |