From 7bc2cfa445142254276d712a0ff6622eaf670253 Mon Sep 17 00:00:00 2001 From: Pavel Reichl Date: Wed, 15 Jan 2014 15:52:35 +0000 Subject: [PATCH 53/53] NSS: add support for subdomain_homedir Resolves: https://fedorahosted.org/sssd/ticket/2169 --- src/responder/nss/nsssrv_cmd.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/responder/nss/nsssrv_cmd.c b/src/responder/nss/nsssrv_cmd.c index c59078b545842561a7e5f62e9a99da6057b23660..9ac3680de4d6ff12fe0c77a3963f84934e385276 100644 --- a/src/responder/nss/nsssrv_cmd.c +++ b/src/responder/nss/nsssrv_cmd.c @@ -201,6 +201,14 @@ static const char *get_homedir_override(TALLOC_CTX *mem_ctx, name, uid, homedir, dom->name, NULL); } + /* Override home directory location for subdomains. + * This option can be overriden by override_homedir. + */ + if (IS_SUBDOMAIN(dom) && dom->subdomain_homedir) { + return expand_homedir_template(mem_ctx, dom->subdomain_homedir, + name, uid, homedir, dom->name, 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. -- 1.8.4.2