]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbdotconf: mark "username map" with substitution="1"
authorRalph Boehme <slow@samba.org>
Tue, 5 Nov 2019 11:11:54 +0000 (12:11 +0100)
committerStefan Metzmacher <metze@samba.org>
Wed, 27 Nov 2019 10:25:36 +0000 (10:25 +0000)
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
docs-xml/smbdotconf/security/usernamemap.xml
source3/auth/user_util.c

index 8867ea6bdecc5b4b7074e67bd8f3ee81e93b4e18..809a54c1e2ff170663b80426c60c682dc55e7cf0 100644 (file)
@@ -1,6 +1,7 @@
 <samba:parameter name="username map"
                  context="G"
                  type="string"
+                 substitution="1"
                  xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
 <description>
     <para>
index a76b5d47ba2c18ff849ec401980439b4d8a7c12d..9e7a68401600fe100fcfedbcd44480a9b7d84dc8 100644 (file)
@@ -281,8 +281,10 @@ bool user_in_list(TALLOC_CTX *ctx, const char *user, const char * const *list)
 
 bool map_username(TALLOC_CTX *ctx, const char *user_in, char **p_user_out)
 {
+       const struct loadparm_substitution *lp_sub =
+               loadparm_s3_global_substitution();
        FILE *f;
-       char *mapfile = lp_username_map(talloc_tos());
+       char *mapfile = lp_username_map(talloc_tos(), lp_sub);
        char *s;
        char buf[512];
        bool mapped_user = False;