summaryrefslogtreecommitdiffstats
path: root/src/confdb
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2011-05-17 16:37:32 +0200
committerStephen Gallagher <sgallagh@redhat.com>2011-05-20 05:49:25 -0400
commitd9d716b547d256c03df97b0ff8282349a0f365ad (patch)
tree5f9d7a5e6f1629deca8326718cff85a2670e5492 /src/confdb
parent54af51d2129d29258108a6dbf072a82c930bf399 (diff)
downloadsssd-d9d716b547d256c03df97b0ff8282349a0f365ad.tar.gz
sssd-d9d716b547d256c03df97b0ff8282349a0f365ad.tar.xz
sssd-d9d716b547d256c03df97b0ff8282349a0f365ad.zip
Add a new option to override home directory value
https://fedorahosted.org/sssd/ticket/551
Diffstat (limited to 'src/confdb')
-rw-r--r--src/confdb/confdb.c9
-rw-r--r--src/confdb/confdb.h2
2 files changed, 10 insertions, 1 deletions
diff --git a/src/confdb/confdb.c b/src/confdb/confdb.c
index fdf409f96..87d33f9bd 100644
--- a/src/confdb/confdb.c
+++ b/src/confdb/confdb.c
@@ -849,9 +849,16 @@ static int confdb_get_domain_internal(struct confdb_ctx *cdb,
goto done;
}
+ tmp = ldb_msg_find_attr_as_string(res->msgs[0],
+ CONFDB_NSS_OVERRIDE_HOMEDIR, NULL);
+ domain->override_homedir = talloc_strdup(domain, tmp);
+ if (!domain->name) {
+ ret = ENOMEM;
+ goto done;
+ }
+
*_domain = domain;
ret = EOK;
-
done:
talloc_free(tmp_ctx);
return ret;
diff --git a/src/confdb/confdb.h b/src/confdb/confdb.h
index 4e8a6dd84..20e82b4dd 100644
--- a/src/confdb/confdb.h
+++ b/src/confdb/confdb.h
@@ -72,6 +72,7 @@
#define CONFDB_NSS_FILTER_USERS "filter_users"
#define CONFDB_NSS_FILTER_GROUPS "filter_groups"
#define CONFDB_NSS_PWFIELD "pwfield"
+#define CONFDB_NSS_OVERRIDE_HOMEDIR "override_homedir"
/* PAM */
#define CONFDB_PAM_CONF_ENTRY "config/pam"
@@ -145,6 +146,7 @@ struct sss_domain_info {
bool legacy_passwords;
gid_t override_gid;
+ const char *override_homedir;
uint32_t entry_cache_timeout;