summaryrefslogtreecommitdiffstats
path: root/src/providers
diff options
context:
space:
mode:
authorLukas Slebodnik <lslebodn@redhat.com>2013-12-02 14:19:09 +0100
committerJakub Hrozek <jhrozek@redhat.com>2014-06-03 12:57:18 +0200
commit00fb34246a4d1d2cb846a6e2a40d8155ee5a36a1 (patch)
tree9d1a6b17d085e187154a4dce0a08b7096f73255c /src/providers
parentf9b90ac1cb9ea76f369459470097996cbbc7b343 (diff)
downloadsssd-00fb34246a4d1d2cb846a6e2a40d8155ee5a36a1.tar.gz
sssd-00fb34246a4d1d2cb846a6e2a40d8155ee5a36a1.tar.xz
sssd-00fb34246a4d1d2cb846a6e2a40d8155ee5a36a1.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 Reviewed-by: Pavel Reichl <preichl@redhat.com>
Diffstat (limited to 'src/providers')
-rw-r--r--src/providers/ipa/ipa_s2n_exop.c1
-rw-r--r--src/providers/ipa/ipa_subdomains_id.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/providers/ipa/ipa_s2n_exop.c b/src/providers/ipa/ipa_s2n_exop.c
index 6bb3384b1..c86cf84a9 100644
--- a/src/providers/ipa/ipa_s2n_exop.c
+++ b/src/providers/ipa/ipa_s2n_exop.c
@@ -743,6 +743,7 @@ static void ipa_s2n_get_user_done(struct tevent_req *subreq)
homedir_ctx.uid = attrs->a.user.pw_uid;
homedir_ctx.domain = state->dom->name;
homedir_ctx.flatname = state->dom->flat_name;
+ homedir_ctx.config_homedir_substr = state->dom->homedir_substr;
homedir = expand_homedir_template(state,
state->dom->subdomain_homedir,
diff --git a/src/providers/ipa/ipa_subdomains_id.c b/src/providers/ipa/ipa_subdomains_id.c
index 96891b348..c5fe14634 100644
--- a/src/providers/ipa/ipa_subdomains_id.c
+++ b/src/providers/ipa/ipa_subdomains_id.c
@@ -382,6 +382,7 @@ get_subdomain_homedir_of_user(TALLOC_CTX *mem_ctx, struct sss_domain_info *dom,
homedir_ctx.uid = uid;
homedir_ctx.domain = dom->name;
homedir_ctx.flatname = dom->flat_name;
+ homedir_ctx.config_homedir_substr = dom->homedir_substr;
ret = sss_parse_name_const(tmp_ctx, dom->names, fqname,
NULL, &name);
if (ret != EOK) {