s4:torture/vfs/fruit: set share_access to NTCREATEX_SHARE_ACCESS_MASK in check_stream...
authorRalph Boehme <slow@samba.org>
Thu, 11 Oct 2018 15:13:52 +0000 (17:13 +0200)
committerJeremy Allison <jra@samba.org>
Wed, 31 Oct 2018 20:27:18 +0000 (21:27 +0100)
Avoid sharing conflicts with other opens on the basefile.

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>
source4/torture/vfs/fruit.c

index 3039c4ecc5bf39cb455d61ad2b66580249ccc857..d067a9c97e20b365e7a988b022d15bd5d1d8e153 100644 (file)
@@ -3053,6 +3053,7 @@ static bool check_stream_list(struct smb2_tree *tree,
        create.in.desired_access = SEC_FILE_ALL;
        create.in.create_options = is_dir ? NTCREATEX_OPTIONS_DIRECTORY : 0;
        create.in.file_attributes = is_dir ? FILE_ATTRIBUTE_DIRECTORY : FILE_ATTRIBUTE_NORMAL;
+       create.in.share_access = NTCREATEX_SHARE_ACCESS_MASK;
        status = smb2_create(tree, tmp_ctx, &create);
        torture_assert_ntstatus_ok_goto(tctx, status, ret, done, "smb2_create");
        h = create.out.file.handle;