]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbdotconf: mark "force user" with substitution="1"
authorRalph Boehme <slow@samba.org>
Thu, 31 Oct 2019 17:40:53 +0000 (18:40 +0100)
committerStefan Metzmacher <metze@samba.org>
Wed, 27 Nov 2019 10:25:33 +0000 (10:25 +0000)
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
docs-xml/smbdotconf/security/forceuser.xml
source3/smbd/service.c

index ff5c7a2f3f11202d62b514fc8b7c7d3ddc6c4df4..f3010a95298de20c10b810b263fc0f573f7608cb 100644 (file)
@@ -1,6 +1,7 @@
 <samba:parameter name="force user"
                  type="string"
                  context="S"
+                 substitution="1"
                  xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
 <description>
     <para>This specifies a UNIX user name that will be 
index a75c85fef6358357e49c9f8c6230b9e645fd7ca8..06a0f379a9f128e3a81f76debb67818f2f7510b5 100644 (file)
@@ -411,7 +411,7 @@ NTSTATUS set_conn_force_user_group(connection_struct *conn, int snum)
                loadparm_s3_global_substitution();
        NTSTATUS status;
 
-       if (*lp_force_user(talloc_tos(), snum)) {
+       if (*lp_force_user(talloc_tos(), lp_sub, snum)) {
 
                /*
                 * Replace conn->session_info with a completely faked up one
@@ -423,7 +423,7 @@ NTSTATUS set_conn_force_user_group(connection_struct *conn, int snum)
                struct auth_session_info *forced_serverinfo;
                bool guest;
 
-               fuser = talloc_string_sub(conn, lp_force_user(talloc_tos(), snum), "%S",
+               fuser = talloc_string_sub(conn, lp_force_user(talloc_tos(), lp_sub, snum), "%S",
                                          lp_const_servicename(snum));
                if (fuser == NULL) {
                        return NT_STATUS_NO_MEMORY;