summaryrefslogtreecommitdiff
path: root/source4/torture/vfs
diff options
context:
space:
mode:
authorRalph Boehme <slow@samba.org>2018-10-31 15:49:45 +0100
committerKarolin Seeger <kseeger@samba.org>2018-11-06 09:10:23 +0100
commitdcd54e8c95e5455f2d89196729c3d79a2c36a346 (patch)
treede1791e21df884c7a40ba7474a3bdf304cdd9105 /source4/torture/vfs
parentf2c7d60a64a21ff8ebd2abb0316bda48ef0a3fde (diff)
downloadsamba-dcd54e8c95e5455f2d89196729c3d79a2c36a346.tar.gz
s4:torture/vfs/fruit: ensure a directory handle is closed in all code paths
Otherwise we get a sharing violation when running against Samba and opening the directory a second time. Bug: https://bugzilla.samba.org/show_bug.cgi?id=13646 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit f7551d8fb3599a6a71dd0570bad02bdc48324107)
Diffstat (limited to 'source4/torture/vfs')
-rw-r--r--source4/torture/vfs/fruit.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/source4/torture/vfs/fruit.c b/source4/torture/vfs/fruit.c
index 0750026f1d5..c34ae1a73d4 100644
--- a/source4/torture/vfs/fruit.c
+++ b/source4/torture/vfs/fruit.c
@@ -3232,15 +3232,12 @@ static bool test_rename_dir_openfile(struct torture_context *torture,
torture_assert_ntstatus_equal(torture, status,
NT_STATUS_ACCESS_DENIED,
"smb2_setinfo_file");
-
- ZERO_STRUCT(cl.smb2);
- cl.smb2.level = RAW_CLOSE_SMB2;
- cl.smb2.in.file.handle = d1;
- status = smb2_close(tree, &(cl.smb2));
- torture_assert_ntstatus_ok(torture, status, "smb2_close");
- ZERO_STRUCT(d1);
}
+ status = smb2_util_close(tree, d1);
+ torture_assert_ntstatus_ok(torture, status, "smb2_util_close\n");
+ ZERO_STRUCT(d1);
+
torture_comment(torture, "Enabling AAPL\n");
ret = enable_aapl(torture, tree);