From: Ralph Boehme Date: Wed, 31 Oct 2018 14:49:45 +0000 (+0100) Subject: s4:torture/vfs/fruit: ensure a directory handle is closed in all code paths X-Git-Tag: tdb-1.3.17~1082 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f7551d8fb3599a6a71dd0570bad02bdc48324107;p=thirdparty%2Fsamba.git 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 --- diff --git a/source4/torture/vfs/fruit.c b/source4/torture/vfs/fruit.c index 681dde53d06..141faa1bc5b 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);