summaryrefslogtreecommitdiff
path: root/src/responder/nss
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2013-02-07 13:04:24 -0500
committerJakub Hrozek <jhrozek@redhat.com>2013-02-10 19:36:12 +0100
commit2cbb879c517f2c756a2eb3962527979bac01ddab (patch)
tree882adf430f134d30d4c34a8368a47e19f229f3f3 /src/responder/nss
parentfa551077410019fb34460dc730950e93b62b2963 (diff)
downloadsssd-2cbb879c517f2c756a2eb3962527979bac01ddab.tar.gz
sssd-2cbb879c517f2c756a2eb3962527979bac01ddab.tar.bz2
sssd-2cbb879c517f2c756a2eb3962527979bac01ddab.zip
NSS: Add original homedir to home directory template options
https://fedorahosted.org/sssd/ticket/1805
Diffstat (limited to 'src/responder/nss')
-rw-r--r--src/responder/nss/nsssrv_cmd.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/responder/nss/nsssrv_cmd.c b/src/responder/nss/nsssrv_cmd.c
index b2dae4a3..5ac1bacc 100644
--- a/src/responder/nss/nsssrv_cmd.c
+++ b/src/responder/nss/nsssrv_cmd.c
@@ -176,28 +176,29 @@ static const char *get_homedir_override(TALLOC_CTX *mem_ctx,
{
const char *homedir;
+ homedir = ldb_msg_find_attr_as_string(msg, SYSDB_HOMEDIR, NULL);
+
/* Check whether we are unconditionally overriding the server
* for home directory locations.
*/
if (dom->override_homedir) {
return expand_homedir_template(mem_ctx, dom->override_homedir,
- name, uid, dom->name);
+ name, uid, homedir, dom->name);
} else if (nctx->override_homedir) {
return expand_homedir_template(mem_ctx, nctx->override_homedir,
- name, uid, dom->name);
+ name, uid, homedir, dom->name);
}
- homedir = ldb_msg_find_attr_as_string(msg, SYSDB_HOMEDIR, NULL);
if (!homedir || *homedir == '\0') {
/* In the case of a NULL or empty homedir, check to see if
* we have a fallback homedir to use.
*/
if (dom->fallback_homedir) {
return expand_homedir_template(mem_ctx, dom->fallback_homedir,
- name, uid, dom->name);
+ name, uid, homedir, dom->name);
} else if (nctx->fallback_homedir) {
return expand_homedir_template(mem_ctx, nctx->fallback_homedir,
- name, uid, dom->name);
+ name, uid, homedir, dom->name);
}
}