summaryrefslogtreecommitdiffstats
path: root/src/responder/nss/nsssrv_cmd.c
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2016-06-19 07:19:15 +0200
committerJakub Hrozek <jhrozek@redhat.com>2016-07-07 10:25:46 +0200
commitaccff8ebe158251b1d25a95b3b035fe7e08fd1ee (patch)
tree08537756662bcfd378ab00d4f6e926bf76bcaf6e /src/responder/nss/nsssrv_cmd.c
parent78f9a9d4a2725f1b2cb6e582c965b5e6f7bdff7d (diff)
downloadsssd-accff8ebe158251b1d25a95b3b035fe7e08fd1ee.tar.gz
sssd-accff8ebe158251b1d25a95b3b035fe7e08fd1ee.tar.xz
sssd-accff8ebe158251b1d25a95b3b035fe7e08fd1ee.zip
UTIL: expand_homedir_template manages usernames internally
expand_homedir_template() can be considered an outward-facing interface, therefore the function and its input structure will accept the internal name format and parse it internally into a username and domain component. Reviewed-by: Sumit Bose <sbose@redhat.com>
Diffstat (limited to 'src/responder/nss/nsssrv_cmd.c')
-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 9ba81a6aa..a54d3d8ba 100644
--- a/src/responder/nss/nsssrv_cmd.c
+++ b/src/responder/nss/nsssrv_cmd.c
@@ -221,10 +221,10 @@ static const char *get_homedir_override(TALLOC_CTX *mem_ctx,
*/
if (dom->override_homedir) {
return expand_homedir_template(mem_ctx, dom->override_homedir,
- homedir_ctx);
+ dom->case_preserve, homedir_ctx);
} else if (nctx->override_homedir) {
return expand_homedir_template(mem_ctx, nctx->override_homedir,
- homedir_ctx);
+ dom->case_preserve, homedir_ctx);
}
if (!homedir || *homedir == '\0') {
@@ -233,15 +233,16 @@ static const char *get_homedir_override(TALLOC_CTX *mem_ctx,
*/
if (dom->fallback_homedir) {
return expand_homedir_template(mem_ctx, dom->fallback_homedir,
- homedir_ctx);
+ dom->case_preserve, homedir_ctx);
} else if (nctx->fallback_homedir) {
return expand_homedir_template(mem_ctx, nctx->fallback_homedir,
- homedir_ctx);
+ dom->case_preserve, homedir_ctx);
}
}
/* Provider can also return template, try to expand it.*/
- return expand_homedir_template(mem_ctx, homedir, homedir_ctx);
+ return expand_homedir_template(mem_ctx, homedir,
+ dom->case_preserve, homedir_ctx);
}
static const char *get_shell_override(TALLOC_CTX *mem_ctx,