From: Ralph Boehme Date: Thu, 31 Oct 2019 17:40:53 +0000 (+0100) Subject: smbdotconf: mark "force user" with substitution="1" X-Git-Tag: ldb-2.1.0~582 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=78593e2f0073bbdf6225c2e5d5bbff5cc7688f5a;p=thirdparty%2Fsamba.git smbdotconf: mark "force user" with substitution="1" Signed-off-by: Ralph Boehme Reviewed-by: Stefan Metzmacher --- diff --git a/docs-xml/smbdotconf/security/forceuser.xml b/docs-xml/smbdotconf/security/forceuser.xml index ff5c7a2f3f1..f3010a95298 100644 --- a/docs-xml/smbdotconf/security/forceuser.xml +++ b/docs-xml/smbdotconf/security/forceuser.xml @@ -1,6 +1,7 @@ This specifies a UNIX user name that will be diff --git a/source3/smbd/service.c b/source3/smbd/service.c index a75c85fef63..06a0f379a9f 100644 --- a/source3/smbd/service.c +++ b/source3/smbd/service.c @@ -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;