summaryrefslogtreecommitdiff
path: root/src/confdb
diff options
context:
space:
mode:
authorJan Zeleny <jzeleny@redhat.com>2012-03-14 06:18:45 -0400
committerStephen Gallagher <sgallagh@redhat.com>2012-04-24 09:19:43 -0400
commit8ccb0de226ccb9330f5a6865de487d6f0313902d (patch)
tree7f6988948cca1599d302dea5eb83da598beda022 /src/confdb
parentd1cec5a8fc58293231c72c1f967ef5421a24a33b (diff)
downloadsssd-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/confdb')
-rw-r--r--src/confdb/confdb.c10
-rw-r--r--src/confdb/confdb.h2
2 files changed, 12 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;