summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-11-02 14:38:08 +0100
committerStefan Metzmacher <metze@samba.org>2011-11-03 09:44:59 +0100
commit881feda3534c3c3e014cde52b6c296b31afbccd0 (patch)
treef77af731ae3452da006e64c8cb8b5fb63aa1e5c0
parent2db221c3845e2b1c44f8237c550704dca41df91a (diff)
downloadsamba-881feda3534c3c3e014cde52b6c296b31afbccd0.tar.gz
samba-881feda3534c3c3e014cde52b6c296b31afbccd0.tar.bz2
samba-881feda3534c3c3e014cde52b6c296b31afbccd0.zip
s3:torture: let SMB2-BASICS work against w2k8r2 and win8pre0
metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Thu Nov 3 09:44:59 CET 2011 on sn-devel-104
-rw-r--r--source3/torture/test_smb2.c34
1 files changed, 24 insertions, 10 deletions
diff --git a/source3/torture/test_smb2.c b/source3/torture/test_smb2.c
index c66d1df4cc..1bd0271a67 100644
--- a/source3/torture/test_smb2.c
+++ b/source3/torture/test_smb2.c
@@ -61,12 +61,17 @@ bool run_smb2_basic(int dummy)
return false;
}
- status = smb2cli_create(
- cli, "test.txt", SMB2_OPLOCK_LEVEL_NONE, 0,
- MAXIMUM_ALLOWED_ACCESS, FILE_ATTRIBUTE_NORMAL,
- FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
- FILE_OVERWRITE_IF, FILE_DELETE_ON_CLOSE, NULL,
- &fid_persistent, &fid_volatile);
+ status = smb2cli_create(cli, "smb2-basic.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_IS_OK(status)) {
printf("smb2cli_create returned %s\n", nt_errstr(status));
return false;
@@ -111,10 +116,19 @@ bool run_smb2_basic(int dummy)
return false;
}
- status = smb2cli_create(
- cli, "", SMB2_OPLOCK_LEVEL_NONE, 0,
- MAXIMUM_ALLOWED_ACCESS, FILE_ATTRIBUTE_DIRECTORY, 0,
- FILE_OPEN, 0, NULL, &fid_persistent, &fid_volatile);
+ status = smb2cli_create(cli, "",
+ SMB2_OPLOCK_LEVEL_NONE, /* oplock_level, */
+ SMB2_IMPERSONATION_IMPERSONATION, /* impersonation_level, */
+ SEC_STD_SYNCHRONIZE|
+ SEC_DIR_LIST|
+ SEC_DIR_READ_ATTRIBUTE, /* desired_access, */
+ 0, /* file_attributes, */
+ FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE, /* share_access, */
+ FILE_OPEN, /* create_disposition, */
+ FILE_SYNCHRONOUS_IO_NONALERT|FILE_DIRECTORY_FILE, /* create_options, */
+ NULL, /* smb2_create_blobs *blobs */
+ &fid_persistent,
+ &fid_volatile);
if (!NT_STATUS_IS_OK(status)) {
printf("smb2cli_create returned %s\n", nt_errstr(status));
return false;