]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4:torture: Add new target 'w2k16'
authorVinit Agnihotri <vagnihot@redhat.com>
Fri, 11 Jul 2025 12:39:08 +0000 (18:09 +0530)
committerAnoop C S <anoopcs@samba.org>
Wed, 13 Aug 2025 17:25:33 +0000 (17:25 +0000)
This fix adds new target 'w2k16' which sets default value for option
'hide_on_access_denied' to true.

'windows 2016 server' returns NT_STATUS_OBJECT_NAME_NOT_FOUND on a createfile when
access is denied rather than NT_STATUS_ACCESS_DENIED. Above option
takes care of this behaviour.

Move TARGET_IS_WINDOWS to utils.h and add all presently defined windows
targets for the same.

Singed-off-by: Vinit Agnihotri <vagnihot@redhat.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source4/torture/raw/lock.c
source4/torture/smbtorture.c
source4/torture/util.h

index 5a8714dc3a5b4f083ce1ad0e425dd2ad6b87d60f..26c26e5984f086c25f133c90bc9a7ea307793999 100644 (file)
 
 #define TARGET_IS_W2K8(_tctx) (torture_setting_bool(_tctx, "w2k8", false))
 #define TARGET_IS_WIN7(_tctx) (torture_setting_bool(_tctx, "win7", false))
-#define TARGET_IS_WINDOWS(_tctx) \
-       ((torture_setting_bool(_tctx, "w2k3", false)) || \
-        (torture_setting_bool(_tctx, "w2k8", false)) || \
-        (torture_setting_bool(_tctx, "win7", false)))
 #define TARGET_IS_SAMBA3(_tctx) (torture_setting_bool(_tctx, "samba3", false))
 #define TARGET_IS_SAMBA4(_tctx) (torture_setting_bool(_tctx, "samba4", false))
 
index 0a9d433567d23fbcb745622e8f87a3363140043d..2aa1acdabab16da876a9f34fc6356e3291dfa9a4 100644 (file)
@@ -596,6 +596,10 @@ int main(int argc, const char *argv[])
 
                lpcfg_set_cmdline(lp_ctx, "torture:hide_on_access_denied",
                    "true");
+       } else if (strcmp(target, "w2k16") == 0) {
+               lpcfg_set_cmdline(lp_ctx, "torture:hide_on_access_denied",
+                   "true");
+               lpcfg_set_cmdline(lp_ctx, "torture:w2k16", "true");
        } else if (strcmp(target, "onefs") == 0) {
                lpcfg_set_cmdline(lp_ctx, "torture:onefs", "true");
                lpcfg_set_cmdline(lp_ctx, "torture:openx_deny_dos_support",
index 385ee157311df1194dffd41dd7095d9a9159718d..5eea1bb55e96b82fa82935a79069e7df5100cbdc 100644 (file)
@@ -36,6 +36,14 @@ struct cli_credentials;
 #define TARGET_IS_WIN7(_tctx) (torture_setting_bool(_tctx, "win7", false))
 #define TARGET_IS_SAMBA3(_tctx) (torture_setting_bool(_tctx, "samba3", false))
 #define TARGET_IS_SAMBA4(_tctx) (torture_setting_bool(_tctx, "samba4", false))
+#define TARGET_IS_W2K16(_tctx) (torture_setting_bool(_tctx, "w2k16", false))
+#define TARGET_IS_WINDOWS(_tctx) \
+       ((torture_setting_bool(_tctx, "winxp", false))  || \
+        (torture_setting_bool(_tctx, "w2k3", false))   || \
+        (torture_setting_bool(_tctx, "w2k8", false))   || \
+        (torture_setting_bool(_tctx, "win7", false))   || \
+        (torture_setting_bool(_tctx, "w2k12", false))  || \
+        (torture_setting_bool(_tctx, "w2k16", false)))
 
 /**
   setup a directory ready for a test