From dcd54e8c95e5455f2d89196729c3d79a2c36a346 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Wed, 31 Oct 2018 15:49:45 +0100 Subject: [PATCH] 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 Reviewed-by: Jeremy Allison (cherry picked from commit f7551d8fb3599a6a71dd0570bad02bdc48324107) --- source4/torture/vfs/fruit.c | 11 ++++------- 1 file 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); -- 2.47.2