samba4: support both user map and valid users on same time
authorLiangbin Lian <jjm2473@gmail.com>
Thu, 24 Nov 2022 10:05:50 +0000 (18:05 +0800)
committerTianling Shen <cnsztl@immortalwrt.org>
Fri, 2 Dec 2022 09:50:54 +0000 (17:50 +0800)
Signed-off-by: Liangbin Lian <jjm2473@gmail.com>
(cherry picked from commit e04e523a01f5144a60541e6468a9f4451f26c8ab)

net/samba4/files/samba.init

index b849a1cd370d182f93f4ad1656642bbcc8410deb..468ba553a2b87ba3cb8d1ca2b9f638f820764a3d 100644 (file)
@@ -115,9 +115,8 @@ smb_add_share() {
                if [ "$force_root" -eq 1 ]; then
                        printf "\tforce user = root\n"
                        printf "\tforce group = root\n"
-               else
-                       [ -n "$users" ] && printf "\tvalid users = %s\n" "$users"
                fi
+               [ -n "$users" ] && printf "\tvalid users = %s\n" "$users"
 
                [ -n "$create_mask" ] && printf "\tcreate mask = %s\n" "$create_mask"
                [ -n "$dir_mask" ] && printf "\tdirectory mask = %s\n" "$dir_mask"