summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-02-27 13:27:38 +0100
committerStefan Metzmacher <metze@samba.org>2012-02-29 07:23:14 +0100
commit65d42ab727d4a335ef4265030d16d31aae015371 (patch)
treedb3fd04b5f6f733be3325728f3ed766e6711b5aa /source3
parent300ab04a07b1de2674528474dba55726c3a3bef1 (diff)
downloadsamba-65d42ab727d4a335ef4265030d16d31aae015371.tar.gz
samba-65d42ab727d4a335ef4265030d16d31aae015371.tar.bz2
samba-65d42ab727d4a335ef4265030d16d31aae015371.zip
s3:torture/test_smb2: test path based calls during reauth in SMB2-MULTI-CHANNEL
metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Wed Feb 29 07:23:14 CET 2012 on sn-devel-104
Diffstat (limited to 'source3')
-rw-r--r--source3/torture/test_smb2.c54
1 files changed, 51 insertions, 3 deletions
diff --git a/source3/torture/test_smb2.c b/source3/torture/test_smb2.c
index f2f9ea0aa3..7ad8f96730 100644
--- a/source3/torture/test_smb2.c
+++ b/source3/torture/test_smb2.c
@@ -1224,6 +1224,12 @@ bool run_smb2_multi_channel(int dummy)
return false;
}
+ status = gensec_update(auth_generic_state->gensec_security, talloc_tos(), ev, out_blob, &in_blob);
+ if (!NT_STATUS_IS_OK(status)) {
+ printf("auth_generic_update returned %s\n", nt_errstr(status));
+ return false;
+ }
+
status = smb2cli_flush(cli1, fid_persistent, fid_volatile);
if (!NT_STATUS_IS_OK(status)) {
printf("smb2cli_flush returned %s\n", nt_errstr(status));
@@ -1242,9 +1248,51 @@ bool run_smb2_multi_channel(int dummy)
return false;
}
- status = gensec_update(auth_generic_state->gensec_security, talloc_tos(), ev, out_blob, &in_blob);
- if (!NT_STATUS_IS_OK(status)) {
- printf("auth_generic_update returned %s\n", nt_errstr(status));
+ status = smb2cli_create(cli1, "multi-channel-invalid.txt",
+ SMB2_OPLOCK_LEVEL_NONE, /* oplock_level, */
+ SMB2_IMPERSONATION_IMPERSONATION, /* impersonation_level, */
+ SEC_STD_ALL | SEC_FILE_ALL, /* desired_access, */
+ FILE_ATTRIBUTE_NORMAL, /* file_attributes, */
+ FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE, /* share_access, */
+ FILE_CREATE, /* create_disposition, */
+ FILE_DELETE_ON_CLOSE, /* create_options, */
+ NULL, /* smb2_create_blobs *blobs */
+ &fid_persistent,
+ &fid_volatile);
+ if (!NT_STATUS_EQUAL(status, NT_STATUS_INVALID_HANDLE)) {
+ printf("smb2cli_create %s\n", nt_errstr(status));
+ return false;
+ }
+
+ status = smb2cli_create(cli2, "multi-channel-invalid.txt",
+ SMB2_OPLOCK_LEVEL_NONE, /* oplock_level, */
+ SMB2_IMPERSONATION_IMPERSONATION, /* impersonation_level, */
+ SEC_STD_ALL | SEC_FILE_ALL, /* desired_access, */
+ FILE_ATTRIBUTE_NORMAL, /* file_attributes, */
+ FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE, /* share_access, */
+ FILE_CREATE, /* create_disposition, */
+ FILE_DELETE_ON_CLOSE, /* create_options, */
+ NULL, /* smb2_create_blobs *blobs */
+ &fid_persistent,
+ &fid_volatile);
+ if (!NT_STATUS_EQUAL(status, NT_STATUS_INVALID_HANDLE)) {
+ printf("smb2cli_create %s\n", nt_errstr(status));
+ return false;
+ }
+
+ status = smb2cli_create(cli3, "multi-channel-invalid.txt",
+ SMB2_OPLOCK_LEVEL_NONE, /* oplock_level, */
+ SMB2_IMPERSONATION_IMPERSONATION, /* impersonation_level, */
+ SEC_STD_ALL | SEC_FILE_ALL, /* desired_access, */
+ FILE_ATTRIBUTE_NORMAL, /* file_attributes, */
+ FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE, /* share_access, */
+ FILE_CREATE, /* create_disposition, */
+ FILE_DELETE_ON_CLOSE, /* create_options, */
+ NULL, /* smb2_create_blobs *blobs */
+ &fid_persistent,
+ &fid_volatile);
+ if (!NT_STATUS_EQUAL(status, NT_STATUS_INVALID_HANDLE)) {
+ printf("smb2cli_create %s\n", nt_errstr(status));
return false;
}