summaryrefslogtreecommitdiffstats
path: root/src/responder/nss/nsssrv.c
diff options
context:
space:
mode:
authorLukas Slebodnik <lslebodn@redhat.com>2013-12-02 14:19:09 +0100
committerJakub Hrozek <jhrozek@redhat.com>2014-06-02 19:07:57 +0200
commitae0a5011e2644eaa482ea1b9e1451eff05c676b9 (patch)
tree5bd7d3a18835317192c9a05eeae6b3234104a489 /src/responder/nss/nsssrv.c
parent5cd660aaa885bca95ac3dca660bb77e5786d5f8e (diff)
downloadsssd-ae0a5011e2644eaa482ea1b9e1451eff05c676b9.tar.gz
sssd-ae0a5011e2644eaa482ea1b9e1451eff05c676b9.tar.xz
sssd-ae0a5011e2644eaa482ea1b9e1451eff05c676b9.zip
NSS: Add option to expand homedir template format
LDAP server can contain template for home directory instead of plain string. This patch adds new expand option "%H", which will be replaced with value from configuration option homedir_substring (from sssd.conf) Resolves: https://fedorahosted.org/sssd/ticket/1853
Diffstat (limited to 'src/responder/nss/nsssrv.c')
-rw-r--r--src/responder/nss/nsssrv.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/responder/nss/nsssrv.c b/src/responder/nss/nsssrv.c
index e4896a79d..1f762cca8 100644
--- a/src/responder/nss/nsssrv.c
+++ b/src/responder/nss/nsssrv.c
@@ -291,6 +291,12 @@ static int nss_get_config(struct nss_ctx *nctx,
&nctx->default_shell);
if (ret != EOK) goto done;
+ ret = confdb_get_string(cdb, nctx, CONFDB_NSS_CONF_ENTRY,
+ CONFDB_NSS_HOMEDIR_SUBSTRING,
+ CONFDB_DEFAULT_HOMEDIR_SUBSTRING,
+ &nctx->homedir_substr);
+ if (ret != EOK) goto done;
+
ret = 0;
done:
return ret;