summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/confdb/confdb.c10
-rw-r--r--src/confdb/confdb.h2
-rw-r--r--src/man/sssd.conf.5.xml15
-rw-r--r--src/util/domain_info_utils.c2
4 files changed, 29 insertions, 0 deletions
diff --git a/src/confdb/confdb.c b/src/confdb/confdb.c
index 0320797cd..fee728757 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 44b334e20..78e375102 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 f14d9a6f3..43eb36325 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 e66bb154a..d8de790d9 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;