s4-torture: make test_session_reauth5 work against Windows 2012R2.
authorGünther Deschner <gd@samba.org>
Fri, 22 Jan 2016 18:06:20 +0000 (19:06 +0100)
committerStefan Metzmacher <metze@samba.org>
Mon, 10 Feb 2020 13:37:49 +0000 (14:37 +0100)
The unlink of the file as anonymous is expected to fail.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
source4/torture/smb2/session.c

index 07c6faebb155c5cdc696012d1aeceae646e1ba73..b330c7e41a23a80cce5a37a28c3bf4e1c0bfbdc1 100644 (file)
@@ -694,8 +694,10 @@ bool test_session_reauth5(struct torture_context *tctx, struct smb2_tree *tree)
        snprintf(fname2, sizeof(fname2), "%s\\file2.dat", dname);
 
        status = smb2_util_unlink(tree, fname2);
-       torture_assert_ntstatus_ok_goto(tctx, status, ret, done,
-                                       "smb2_util_unlink failed");
+       torture_assert_ntstatus_equal_goto(tctx, status,
+                                          NT_STATUS_ACCESS_DENIED,
+                                          ret, done, "smb2_util_unlink "
+                                          "returned unexpected status");
 
 
        ZERO_STRUCT(sfinfo);