summaryrefslogtreecommitdiff
path: root/source4/torture/smb2
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2008-05-27 15:00:05 +1000
committerAndrew Tridgell <tridge@samba.org>2008-05-27 15:00:05 +1000
commit7ae464b548cc6f57b11733e5f5de36e4e1fa0265 (patch)
tree8236a23f3a1c9e6d5e1a01041348f882cb915b7a /source4/torture/smb2
parent65e31a965ee6514610ec0d4ca52a5cd8772c5254 (diff)
downloadsamba-7ae464b548cc6f57b11733e5f5de36e4e1fa0265.tar.gz
samba-7ae464b548cc6f57b11733e5f5de36e4e1fa0265.tar.bz2
samba-7ae464b548cc6f57b11733e5f5de36e4e1fa0265.zip
another gentest derived test
(This used to be commit bb546ab3779b235c5276ef9a714d1ca57b6815c9)
Diffstat (limited to 'source4/torture/smb2')
-rw-r--r--source4/torture/smb2/create.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/source4/torture/smb2/create.c b/source4/torture/smb2/create.c
index 3cc825bd62..9f7ceb20ad 100644
--- a/source4/torture/smb2/create.c
+++ b/source4/torture/smb2/create.c
@@ -152,6 +152,27 @@ bool torture_smb2_create_gentest(struct torture_context *torture, struct smb2_tr
CHECK_EQUAL(file_attributes, 0xffff87c8);
CHECK_EQUAL(denied_mask, 0x4000);
+ smb2_deltree(tree, FNAME);
+
+ ZERO_STRUCT(io);
+ io.in.desired_access = SEC_FLAG_MAXIMUM_ALLOWED;
+ io.in.file_attributes = 0;
+ io.in.create_disposition = NTCREATEX_DISP_OVERWRITE_IF;
+ io.in.share_access =
+ NTCREATEX_SHARE_ACCESS_READ|
+ NTCREATEX_SHARE_ACCESS_WRITE;
+ io.in.create_options = 0;
+ io.in.fname = FNAME ":stream1";
+ status = smb2_create(tree, tmp_ctx, &io);
+ CHECK_STATUS(status, NT_STATUS_OK);
+
+ io.in.fname = FNAME;
+ io.in.file_attributes = 0x8040;
+ io.in.share_access =
+ NTCREATEX_SHARE_ACCESS_READ;
+ status = smb2_create(tree, tmp_ctx, &io);
+ CHECK_STATUS(status, NT_STATUS_INVALID_PARAMETER);
+
talloc_free(tmp_ctx);
return true;