-/*
+/*
Unix SMB/CIFS implementation.
SMB2 create test suite
Copyright (C) Andrew Tridgell 2008
-
+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
io.in.desired_access = SEC_FLAG_MAXIMUM_ALLOWED;
io.in.file_attributes = FILE_ATTRIBUTE_NORMAL;
io.in.create_disposition = NTCREATEX_DISP_OVERWRITE_IF;
- io.in.share_access =
+ io.in.share_access =
NTCREATEX_SHARE_ACCESS_DELETE|
NTCREATEX_SHARE_ACCESS_READ|
NTCREATEX_SHARE_ACCESS_WRITE;
io.in.file_attributes = FILE_ATTRIBUTE_VOLUME;
status = smb2_create(tree, tctx, &io);
CHECK_STATUS(status, NT_STATUS_INVALID_PARAMETER);
-
+
io.in.create_disposition = NTCREATEX_DISP_CREATE;
io.in.desired_access = 0x08000000;
status = smb2_create(tree, tctx, &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 =
+ io.in.share_access =
NTCREATEX_SHARE_ACCESS_READ|
NTCREATEX_SHARE_ACCESS_WRITE;
io.in.create_options = 0;
io.in.fname = FNAME;
io.in.file_attributes = 0x8040;
- io.in.share_access =
+ io.in.share_access =
NTCREATEX_SHARE_ACCESS_READ;
status = smb2_create(tree, tctx, &io);
CHECK_STATUS(status, NT_STATUS_INVALID_PARAMETER);
io.in.share_access = 0;
status = smb2_create(tree, tctx, &io);
CHECK_STATUS(status, NT_STATUS_ACCESS_DENIED);
-
+
smb2_deltree(tree, FNAME);
return true;
io.in.desired_access = SEC_FLAG_MAXIMUM_ALLOWED;
io.in.file_attributes = FILE_ATTRIBUTE_NORMAL;
io.in.create_disposition = NTCREATEX_DISP_OVERWRITE_IF;
- io.in.share_access =
+ io.in.share_access =
NTCREATEX_SHARE_ACCESS_DELETE|
NTCREATEX_SHARE_ACCESS_READ|
NTCREATEX_SHARE_ACCESS_WRITE;
torture_comment(tctx, "Testing alloc size\n");
/* FIXME We use 1M cause that's the rounded size of Samba.
- * We should ask the server for the cluser size and calulate it
+ * We should ask the server for the cluster size and calculate it
* correctly. */
io.in.alloc_size = 0x00100000;
status = smb2_create(tree, tctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
smb2_deltree(tree, FNAME);
-
+
return true;
}
io.in.desired_access = SEC_FLAG_MAXIMUM_ALLOWED;
io.in.file_attributes = FILE_ATTRIBUTE_NORMAL;
io.in.create_disposition = NTCREATEX_DISP_CREATE;
- io.in.share_access =
+ io.in.share_access =
NTCREATEX_SHARE_ACCESS_DELETE |
NTCREATEX_SHARE_ACCESS_READ |
NTCREATEX_SHARE_ACCESS_WRITE;
q.query_secdesc.level = RAW_FILEINFO_SEC_DESC;
q.query_secdesc.in.file.handle = io.out.file.handle;
- q.query_secdesc.in.secinfo_flags =
+ q.query_secdesc.in.secinfo_flags =
SECINFO_OWNER |
SECINFO_GROUP |
SECINFO_DACL;
FAIL_UNLESS(smb2_util_verify_sd(tctx, tree, io.out.file.handle, sd));
FAIL_UNLESS(smb2_util_verify_attrib(tctx, tree, io.out.file.handle, attrib));
-
+
status = smb2_util_close(tree, io.out.file.handle);
CHECK_STATUS(status, NT_STATUS_OK);
status = delete_func(tree, FNAME);
setenv("TZ", "GMT", 1);
/* strptime does not set tm.tm_isdst but mktime assumes DST is in
- * effect if it is greather than 1. */
+ * effect if it is greater than 1. */
ZERO_STRUCT(tm);
p = strptime(snapshot, "@GMT-%Y.%m.%d-%H.%M.%S", &tm);
setenv("TZ", "GMT", 1);
/* strptime does not set tm.tm_isdst but mktime assumes DST is in
- * effect if it is greather than 1. */
+ * effect if it is greater than 1. */
ZERO_STRUCT(tm);
p = strptime(snapshot, "@GMT-%Y.%m.%d-%H.%M.%S", &tm);
setenv("TZ", "GMT", 1);
/* strptime does not set tm.tm_isdst but mktime assumes DST is in
- * effect if it is greather than 1. */
+ * effect if it is greater than 1. */
ZERO_STRUCT(tm);
p = strptime(snapshot, "@GMT-%Y.%m.%d-%H.%M.%S", &tm);
setenv("TZ", "GMT", 1);
/* strptime does not set tm.tm_isdst but mktime assumes DST is in
- * effect if it is greather than 1. */
+ * effect if it is greater than 1. */
ZERO_STRUCT(tm);
p = strptime(snapshot, "@GMT-%Y.%m.%d-%H.%M.%S", &tm);
/*
* Do some modifications on the stream (IO, setinfo), verifying File-ID
- * after earch step.
+ * after each step.
*/
create = (struct smb2_create) {
.in.desired_access = SEC_FILE_ALL,
/*
* Do some modifications on the stream (IO, setinfo), verifying File-ID
- * after earch step.
+ * after each step.
*/
create = (struct smb2_create) {
.in.desired_access = SEC_FILE_ALL,
io.in.timeout = UINT32_MAX;
/*
- * Adapt the response to the exepected values
+ * Adapt the response to the expected values
*/
ref2 = ref1;
ref2.out.oplock_level = smb2_util_oplock_level("");
* It won't pass against Windows as it returns
* NT_STATUS_SHARING_VIOLATION to the replay (after
* 35 seconds), and this tests reports NT_STATUS_IO_TIMEOUT,
- * as it expectes a NT_STATUS_FILE_NOT_AVAILABLE within 5 seconds.
+ * as it expects a NT_STATUS_FILE_NOT_AVAILABLE within 5 seconds.
* see test_dhv2_pending1n_vs_violation_lease_close_windows().
*/
static bool test_dhv2_pending1n_vs_violation_lease_close_sane(struct torture_context *tctx,
* It won't pass against Windows as it returns
* NT_STATUS_SHARING_VIOLATION to the replay (after
* 35 seconds), and this tests reports NT_STATUS_IO_TIMEOUT,
- * as it expectes a NT_STATUS_FILE_NOT_AVAILABLE within 5 seconds.
+ * as it expects a NT_STATUS_FILE_NOT_AVAILABLE within 5 seconds.
* see test_dhv2_pending1n_vs_violation_lease_ack_windows().
*/
static bool test_dhv2_pending1n_vs_violation_lease_ack_sane(struct torture_context *tctx,