From: Ralph Boehme Date: Mon, 4 Nov 2019 16:50:59 +0000 (+0100) Subject: smbdotconf: mark "homedir map" with substitution="1" X-Git-Tag: ldb-2.1.0~545 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9f3c05d009a7b6daf720e535e06e33a5ea13bf6b;p=thirdparty%2Fsamba.git smbdotconf: mark "homedir map" with substitution="1" Signed-off-by: Ralph Boehme Reviewed-by: Stefan Metzmacher --- diff --git a/docs-xml/smbdotconf/misc/homedirmap.xml b/docs-xml/smbdotconf/misc/homedirmap.xml index 279b0b6e52e..ba70730860a 100644 --- a/docs-xml/smbdotconf/misc/homedirmap.xml +++ b/docs-xml/smbdotconf/misc/homedirmap.xml @@ -1,6 +1,7 @@ diff --git a/source3/lib/util.c b/source3/lib/util.c index ec2ff3c09b5..ce89c0659af 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -630,9 +630,11 @@ static char *strip_mount_options(TALLOC_CTX *ctx, const char *str) #ifdef WITH_NISPLUS_HOME char *automount_lookup(TALLOC_CTX *ctx, const char *user_name) { + const struct loadparm_substitution *lp_sub = + loadparm_s3_global_substitution(); char *value = NULL; - char *nis_map = (char *)lp_homedir_map(talloc_tos()); + char *nis_map = (char *)lp_homedir_map(talloc_tos(), lp_sub); char buffer[NIS_MAXATTRVAL + 1]; nis_result *result; @@ -678,13 +680,15 @@ char *automount_lookup(TALLOC_CTX *ctx, const char *user_name) char *automount_lookup(TALLOC_CTX *ctx, const char *user_name) { + const struct loadparm_substitution *lp_sub = + loadparm_s3_global_substitution(); char *value = NULL; int nis_error; /* returned by yp all functions */ char *nis_result; /* yp_match inits this */ int nis_result_len; /* and set this */ char *nis_domain; /* yp_get_default_domain inits this */ - char *nis_map = lp_homedir_map(talloc_tos()); + char *nis_map = lp_homedir_map(talloc_tos(), lp_sub); if ((nis_error = yp_get_default_domain(&nis_domain)) != 0) { DEBUG(3, ("YP Error: %s\n", yperr_string(nis_error)));