summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2008-05-28 16:59:12 +1000
committerAndrew Tridgell <tridge@samba.org>2008-05-28 16:59:12 +1000
commit0eb4ecc81a2fa1f37e09b60e750854d75ac425a0 (patch)
tree3f705988013c77277f61002f8a02112a66131eea /source4/torture
parent669c528611a032626e5e594d04d8360c2aaa32c2 (diff)
downloadsamba-0eb4ecc81a2fa1f37e09b60e750854d75ac425a0.tar.gz
samba-0eb4ecc81a2fa1f37e09b60e750854d75ac425a0.tar.bz2
samba-0eb4ecc81a2fa1f37e09b60e750854d75ac425a0.zip
test unknown tags and bad tag lengths
(This used to be commit 72902c1d0f85048adf3088b4f90bbc34858b8658)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/smb2/create.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/source4/torture/smb2/create.c b/source4/torture/smb2/create.c
index 070cb65c5c..211b418a12 100644
--- a/source4/torture/smb2/create.c
+++ b/source4/torture/smb2/create.c
@@ -268,6 +268,25 @@ bool torture_smb2_create_blob(struct torture_context *torture, struct smb2_tree
status = smb2_util_close(tree, io.out.file.handle);
CHECK_STATUS(status, NT_STATUS_OK);
+ printf("testing unknown tag\n");
+ status = smb2_create_blob_add(tmp_ctx, &io.in.blobs,
+ "FooO", data_blob(NULL, 0));
+ CHECK_STATUS(status, NT_STATUS_OK);
+
+ status = smb2_create(tree, tmp_ctx, &io);
+ CHECK_STATUS(status, NT_STATUS_OK);
+
+ status = smb2_util_close(tree, io.out.file.handle);
+ CHECK_STATUS(status, NT_STATUS_OK);
+
+ printf("testing bad tag length\n");
+ status = smb2_create_blob_add(tmp_ctx, &io.in.blobs,
+ "xxx", data_blob(NULL, 0));
+ CHECK_STATUS(status, NT_STATUS_OK);
+
+ status = smb2_create(tree, tmp_ctx, &io);
+ CHECK_STATUS(status, NT_STATUS_INVALID_PARAMETER);
+
talloc_free(tmp_ctx);
smb2_deltree(tree, FNAME);