summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorRalph Boehme <slow@samba.org>2018-10-15 15:17:08 +0200
committerKarolin Seeger <kseeger@samba.org>2018-11-06 09:10:24 +0100
commit46c5c8ab3797491252d96dd1722171894b7a71d5 (patch)
tree1cae8f406ae3d8cdc281ab9e8735eb5088f8869b /source4/torture
parenta14fe5b863b0d4c15bb30fbcc699861566e55706 (diff)
downloadsamba-46c5c8ab3797491252d96dd1722171894b7a71d5.tar.gz
s4:torture/vfs/fruit: update test "creating rsrc with read-only access" for newer macOS versions
While this operation failed against older macOS versions, it passes against versions 10.12 and newer. Update the test accordingly, a subsequent commit will then update our implementation. 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 c3cf09a0791ed4dfb7ca18d175396ac1aca5d2ed)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/vfs/fruit.c28
1 files changed, 1 insertions, 27 deletions
diff --git a/source4/torture/vfs/fruit.c b/source4/torture/vfs/fruit.c
index ff3ea274f65..22a434398e7 100644
--- a/source4/torture/vfs/fruit.c
+++ b/source4/torture/vfs/fruit.c
@@ -2045,7 +2045,7 @@ static bool test_rfork_create_ro(struct torture_context *tctx,
}
torture_comment(tctx, "(%s) Try opening read-only with "
- "open_if create disposition, should return ENOENT\n",
+ "open_if create disposition, should work\n",
__location__);
ZERO_STRUCT(create);
@@ -2055,32 +2055,6 @@ static bool test_rfork_create_ro(struct torture_context *tctx,
create.in.file_attributes = FILE_ATTRIBUTE_NORMAL;
create.in.share_access = FILE_SHARE_READ | FILE_SHARE_DELETE;
status = smb2_create(tree, mem_ctx, &(create));
- torture_assert_ntstatus_equal_goto(tctx, status,
- NT_STATUS_OBJECT_NAME_NOT_FOUND,
- ret, done, "smb2_create failed\n");
-
- torture_comment(tctx, "(%s) Now write something to the "
- "rsrc stream, then the same open should succeed\n",
- __location__);
-
- ret = write_stream(tree, __location__, tctx, mem_ctx,
- fname, AFPRESOURCE_STREAM_NAME,
- 0, 3, "foo");
- torture_assert_goto(tctx, ret == true, ret, done,
- "write_stream failed\n");
-
- ret = check_stream(tree, __location__, tctx, mem_ctx,
- fname, AFPRESOURCE_STREAM,
- 0, 3, 0, 3, "foo");
- torture_assert_goto(tctx, ret == true, ret, done, "check_stream");
-
- ZERO_STRUCT(create);
- create.in.fname = rfork;
- create.in.create_disposition = NTCREATEX_DISP_OPEN_IF;
- create.in.desired_access = SEC_FILE_READ_DATA | SEC_STD_READ_CONTROL;
- create.in.file_attributes = FILE_ATTRIBUTE_NORMAL;
- create.in.share_access = FILE_SHARE_READ | FILE_SHARE_DELETE;
- status = smb2_create(tree, mem_ctx, &(create));
torture_assert_ntstatus_ok_goto(tctx, status, ret, done,
"smb2_create failed\n");