]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbdotconf: mark "homedir map" with substitution="1"
authorRalph Boehme <slow@samba.org>
Mon, 4 Nov 2019 16:50:59 +0000 (17:50 +0100)
committerStefan Metzmacher <metze@samba.org>
Wed, 27 Nov 2019 10:25:34 +0000 (10:25 +0000)
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
docs-xml/smbdotconf/misc/homedirmap.xml
source3/lib/util.c

index 279b0b6e52e478edaaa0006d65903e1716f009da..ba70730860a860572491f4dff920e7dd20ed4b05 100644 (file)
@@ -1,6 +1,7 @@
 <samba:parameter name="homedir map"
                  context="G"
                  type="string"
+                 substitution="1"
                  xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
  <description>
        <para>
index ec2ff3c09b50dc765c12a1890d5ec4af6b6f079a..ce89c0659af6b291e2648bc852db2534020f64d4 100644 (file)
@@ -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)));