mirror of
https://github.com/samba-team/samba.git
synced 2025-02-23 09:57:40 +03:00
s4-smb: declare root_fid as a file handle
In order to implement root_fid in the s4 SMB server we need to declare it as a handle type, just as for other fnum values in SMB. This required some extensive (but simple) changes in many bits of code.
This commit is contained in:
parent
c73ba89112
commit
3c028ff88b
@ -241,7 +241,7 @@ int smbcli_nt_create_full(struct smbcli_tree *tree, const char *fname,
|
||||
|
||||
open_parms.ntcreatex.level = RAW_OPEN_NTCREATEX;
|
||||
open_parms.ntcreatex.in.flags = CreatFlags;
|
||||
open_parms.ntcreatex.in.root_fid = 0;
|
||||
open_parms.ntcreatex.in.root_fid.fnum = 0;
|
||||
open_parms.ntcreatex.in.access_mask = DesiredAccess;
|
||||
open_parms.ntcreatex.in.file_attr = FileAttributes;
|
||||
open_parms.ntcreatex.in.alloc_size = 0;
|
||||
|
@ -1418,7 +1418,7 @@ union smb_open {
|
||||
enum smb_open_level level;
|
||||
struct {
|
||||
uint32_t flags;
|
||||
uint32_t root_fid;
|
||||
union smb_handle root_fid;
|
||||
uint32_t access_mask;
|
||||
uint64_t alloc_size;
|
||||
uint32_t file_attr;
|
||||
@ -1628,7 +1628,7 @@ union smb_open {
|
||||
enum smb_open_level level;
|
||||
struct {
|
||||
uint32_t flags;
|
||||
uint32_t root_fid;
|
||||
union smb_handle root_fid;
|
||||
uint32_t access_mask;
|
||||
uint64_t alloc_size;
|
||||
uint32_t file_attr;
|
||||
|
@ -379,7 +379,7 @@ static struct smbcli_request *smb_raw_nttrans_create_send(struct smbcli_tree *tr
|
||||
params = nt.in.params.data;
|
||||
|
||||
SIVAL(params, 0, parms->ntcreatex.in.flags);
|
||||
SIVAL(params, 4, parms->ntcreatex.in.root_fid);
|
||||
SIVAL(params, 4, parms->ntcreatex.in.root_fid.fnum);
|
||||
SIVAL(params, 8, parms->ntcreatex.in.access_mask);
|
||||
SBVAL(params, 12, parms->ntcreatex.in.alloc_size);
|
||||
SIVAL(params, 20, parms->ntcreatex.in.file_attr);
|
||||
@ -564,7 +564,7 @@ _PUBLIC_ struct smbcli_request *smb_raw_open_send(struct smbcli_tree *tree, unio
|
||||
SSVAL(req->out.vwv, VWV(1),0);
|
||||
SCVAL(req->out.vwv, VWV(2),0); /* padding */
|
||||
SIVAL(req->out.vwv, 7, parms->ntcreatex.in.flags);
|
||||
SIVAL(req->out.vwv, 11, parms->ntcreatex.in.root_fid);
|
||||
SIVAL(req->out.vwv, 11, parms->ntcreatex.in.root_fid.fnum);
|
||||
SIVAL(req->out.vwv, 15, parms->ntcreatex.in.access_mask);
|
||||
SBVAL(req->out.vwv, 19, parms->ntcreatex.in.alloc_size);
|
||||
SIVAL(req->out.vwv, 27, parms->ntcreatex.in.file_attr);
|
||||
@ -623,7 +623,7 @@ _PUBLIC_ struct smbcli_request *smb_raw_open_send(struct smbcli_tree *tree, unio
|
||||
SSVAL(req->out.vwv, VWV(1),0);
|
||||
SCVAL(req->out.vwv, VWV(2),0); /* padding */
|
||||
SIVAL(req->out.vwv, 7, parms->ntcreatexreadx.in.flags);
|
||||
SIVAL(req->out.vwv, 11, parms->ntcreatexreadx.in.root_fid);
|
||||
SIVAL(req->out.vwv, 11, parms->ntcreatexreadx.in.root_fid.fnum);
|
||||
SIVAL(req->out.vwv, 15, parms->ntcreatexreadx.in.access_mask);
|
||||
SBVAL(req->out.vwv, 19, parms->ntcreatexreadx.in.alloc_size);
|
||||
SIVAL(req->out.vwv, 27, parms->ntcreatexreadx.in.file_attr);
|
||||
|
@ -254,7 +254,7 @@ struct composite_context *smb_composite_appendacl_send(struct smbcli_tree *tree,
|
||||
if (state->io_open == NULL) goto failed;
|
||||
|
||||
state->io_open->ntcreatex.level = RAW_OPEN_NTCREATEX;
|
||||
state->io_open->ntcreatex.in.root_fid = 0;
|
||||
state->io_open->ntcreatex.in.root_fid.fnum = 0;
|
||||
state->io_open->ntcreatex.in.flags = 0;
|
||||
state->io_open->ntcreatex.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
|
||||
state->io_open->ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL;
|
||||
|
@ -476,7 +476,7 @@ struct composite_context *dcerpc_pipe_open_smb_send(struct dcerpc_pipe *p,
|
||||
|
||||
state->open->ntcreatex.level = RAW_OPEN_NTCREATEX;
|
||||
state->open->ntcreatex.in.flags = 0;
|
||||
state->open->ntcreatex.in.root_fid = 0;
|
||||
state->open->ntcreatex.in.root_fid.fnum = 0;
|
||||
state->open->ntcreatex.in.access_mask =
|
||||
SEC_STD_READ_CONTROL |
|
||||
SEC_FILE_WRITE_ATTRIBUTE |
|
||||
|
@ -515,7 +515,7 @@ NTSTATUS ntvfs_map_open(struct ntvfs_module_context *ntvfs,
|
||||
io2->generic.in.flags = 0;
|
||||
break;
|
||||
}
|
||||
io2->generic.in.root_fid = 0;
|
||||
io2->generic.in.root_fid.fnum = 0;
|
||||
io2->generic.in.access_mask = io->smb2.in.desired_access;
|
||||
io2->generic.in.alloc_size = io->smb2.in.alloc_size;
|
||||
io2->generic.in.file_attr = io->smb2.in.file_attributes;
|
||||
|
@ -119,7 +119,7 @@ static NTSTATUS nttrans_create(struct smbsrv_request *req,
|
||||
params = trans->in.params.data;
|
||||
|
||||
io->ntcreatex.in.flags = IVAL(params, 0);
|
||||
io->ntcreatex.in.root_fid = IVAL(params, 4);
|
||||
io->ntcreatex.in.root_fid.fnum = IVAL(params, 4);
|
||||
io->ntcreatex.in.access_mask = IVAL(params, 8);
|
||||
io->ntcreatex.in.alloc_size = BVAL(params, 12);
|
||||
io->ntcreatex.in.file_attr = IVAL(params, 20);
|
||||
|
@ -2216,7 +2216,7 @@ void smbsrv_reply_ntcreate_and_X(struct smbsrv_request *req)
|
||||
/* notice that the word parameters are not word aligned, so we don't use VWV() */
|
||||
fname_len = SVAL(req->in.vwv, 5);
|
||||
io->ntcreatex.in.flags = IVAL(req->in.vwv, 7);
|
||||
io->ntcreatex.in.root_fid = IVAL(req->in.vwv, 11);
|
||||
io->ntcreatex.in.root_fid.ntvfs = smbsrv_pull_fnum(req, req->in.vwv, 11);
|
||||
io->ntcreatex.in.access_mask = IVAL(req->in.vwv, 15);
|
||||
io->ntcreatex.in.alloc_size = BVAL(req->in.vwv, 19);
|
||||
io->ntcreatex.in.file_attr = IVAL(req->in.vwv, 27);
|
||||
|
@ -1493,7 +1493,7 @@ static bool torture_samba3_errorpaths(struct torture_context *tctx)
|
||||
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.flags = NTCREATEX_FLAGS_EXTENDED;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
|
||||
io.ntcreatex.in.alloc_size = 1024*1024;
|
||||
io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_DIRECTORY;
|
||||
@ -1627,7 +1627,7 @@ static bool torture_samba3_errorpaths(struct torture_context *tctx)
|
||||
smbcli_close(cli_nt->tree, fnum);
|
||||
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
|
||||
io.ntcreatex.in.alloc_size = 0;
|
||||
io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_DIRECTORY;
|
||||
|
@ -70,7 +70,7 @@ static NTSTATUS unicode_open(struct torture_context *tctx,
|
||||
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.flags = NTCREATEX_FLAGS_EXTENDED;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
|
||||
io.ntcreatex.in.alloc_size = 0;
|
||||
io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL;
|
||||
|
@ -1768,7 +1768,7 @@ static bool torture_ntdenytest(struct torture_context *tctx,
|
||||
GetTimeOfDay(&tv_start);
|
||||
|
||||
io1.ntcreatex.level = RAW_OPEN_NTCREATEX;
|
||||
io1.ntcreatex.in.root_fid = 0;
|
||||
io1.ntcreatex.in.root_fid.fnum = 0;
|
||||
io1.ntcreatex.in.flags = NTCREATEX_FLAGS_EXTENDED;
|
||||
io1.ntcreatex.in.create_options = NTCREATEX_OPTIONS_NON_DIRECTORY_FILE;
|
||||
io1.ntcreatex.in.file_attr = 0;
|
||||
@ -2150,6 +2150,7 @@ static void createx_fill_file(union smb_open *open_parms, int accessmode,
|
||||
.open_disposition = NTCREATEX_DISP_OPEN_IF,
|
||||
.create_options = 0,
|
||||
.fname = fname,
|
||||
.root_fid = { .fnum = 0 },
|
||||
);
|
||||
}
|
||||
|
||||
@ -2189,7 +2190,7 @@ static bool createx_test_dir(struct torture_context *tctx,
|
||||
.open_disposition = NTCREATEX_DISP_CREATE,
|
||||
.create_options = 0,
|
||||
.fname = CHILD,
|
||||
.root_fid = fnum,
|
||||
.root_fid = { .fnum = fnum },
|
||||
);
|
||||
|
||||
result[CXD_DIR_CREATE_CHILD] =
|
||||
@ -2205,7 +2206,7 @@ static bool createx_test_dir(struct torture_context *tctx,
|
||||
.open_disposition = NTCREATEX_DISP_OPEN,
|
||||
.create_options = 0,
|
||||
.fname = KNOWN,
|
||||
.root_fid = fnum,
|
||||
.root_fid = {.fnum = fnum},
|
||||
);
|
||||
|
||||
result[CXD_DIR_TRAVERSE] =
|
||||
@ -2231,14 +2232,14 @@ static bool createx_test_file(struct torture_context *tctx,
|
||||
rd.readx.in.file.fnum = fnum;
|
||||
rd.readx.in.mincnt = sizeof(buf);
|
||||
rd.readx.in.maxcnt = sizeof(buf);
|
||||
rd.readx.out.data = buf;
|
||||
rd.readx.out.data = (uint8_t *)buf;
|
||||
|
||||
result[CXD_FILE_READ] = smb_raw_read(tree, &rd);
|
||||
|
||||
wr.writex.level = RAW_WRITE_WRITEX;
|
||||
wr.writex.in.file.fnum = fnum;
|
||||
wr.writex.in.count = sizeof(buf);
|
||||
wr.writex.in.data = buf;
|
||||
wr.writex.in.data = (uint8_t *)buf;
|
||||
|
||||
result[CXD_FILE_WRITE] = smb_raw_write(tree, &wr);
|
||||
|
||||
@ -2248,7 +2249,7 @@ static bool createx_test_file(struct torture_context *tctx,
|
||||
rd.readx.in.mincnt = sizeof(buf);
|
||||
rd.readx.in.maxcnt = sizeof(buf);
|
||||
rd.readx.in.read_for_execute = 1;
|
||||
rd.readx.out.data = buf;
|
||||
rd.readx.out.data = (uint8_t *)buf;
|
||||
|
||||
result[CXD_FILE_EXECUTE] = smb_raw_read(tree, &rd);
|
||||
|
||||
@ -2580,7 +2581,6 @@ bool torture_createx_access(struct torture_context *tctx,
|
||||
torture_createx_specific(tctx, cli, NULL, mem_ctx,
|
||||
&cxd, est);
|
||||
}
|
||||
|
||||
for (i = 0; i < num_access_bits; i++) {
|
||||
/* And now run through the single access bits. */
|
||||
cxd.cxd_access1 = 1 << i;
|
||||
|
@ -49,7 +49,7 @@ static bool test_disconnect_open(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
|
||||
printf("trying open/disconnect\n");
|
||||
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.flags = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_FILE_READ_DATA;
|
||||
io.ntcreatex.in.create_options = 0;
|
||||
|
@ -65,7 +65,7 @@ bool torture_unlinktest(struct torture_context *tctx, struct smbcli_state *cli)
|
||||
torture_comment(tctx, "testing unlink after ntcreatex with DELETE access\n");
|
||||
|
||||
io.ntcreatex.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.flags = NTCREATEX_FLAGS_EXTENDED;
|
||||
io.ntcreatex.in.create_options = NTCREATEX_OPTIONS_NON_DIRECTORY_FILE;
|
||||
io.ntcreatex.in.file_attr = 0;
|
||||
|
@ -1819,7 +1819,7 @@ static bool handler_smb_ntcreatex(int instance)
|
||||
|
||||
parm[0].ntcreatex.level = RAW_OPEN_NTCREATEX;
|
||||
parm[0].ntcreatex.in.flags = gen_ntcreatex_flags();
|
||||
parm[0].ntcreatex.in.root_fid = gen_root_fid(instance);
|
||||
parm[0].ntcreatex.in.root_fid.fnum = gen_root_fid(instance);
|
||||
parm[0].ntcreatex.in.access_mask = gen_access_mask();
|
||||
parm[0].ntcreatex.in.alloc_size = gen_alloc_size();
|
||||
parm[0].ntcreatex.in.file_attr = gen_attrib();
|
||||
@ -1837,8 +1837,8 @@ static bool handler_smb_ntcreatex(int instance)
|
||||
}
|
||||
|
||||
GEN_COPY_PARM;
|
||||
if (parm[0].ntcreatex.in.root_fid != 0) {
|
||||
GEN_SET_FNUM_SMB(ntcreatex.in.root_fid);
|
||||
if (parm[0].ntcreatex.in.root_fid.fnum != 0) {
|
||||
GEN_SET_FNUM_SMB(ntcreatex.in.root_fid.fnum);
|
||||
}
|
||||
GEN_CALL_SMB(smb_raw_open(tree, current_op.mem_ctx, &parm[i]));
|
||||
|
||||
|
@ -487,7 +487,7 @@ static bool nb_do_createx(struct ftable *f,
|
||||
|
||||
io.ntcreatex.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.flags = flags;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.access_mask = desired_access;
|
||||
io.ntcreatex.in.file_attr = 0;
|
||||
io.ntcreatex.in.alloc_size = 0;
|
||||
|
@ -57,7 +57,7 @@ static bool test_sd(struct torture_context *tctx,
|
||||
printf("TESTING SETFILEINFO EA_SET\n");
|
||||
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.flags = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
|
||||
io.ntcreatex.in.create_options = 0;
|
||||
@ -161,7 +161,7 @@ static bool test_nttrans_create(struct torture_context *tctx,
|
||||
printf("testing nttrans create with sec_desc\n");
|
||||
|
||||
io.generic.level = RAW_OPEN_NTTRANS_CREATE;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.flags = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
|
||||
io.ntcreatex.in.create_options = 0;
|
||||
@ -267,7 +267,7 @@ static bool test_nttrans_create_null_dacl(struct torture_context *tctx,
|
||||
printf("TESTING SEC_DESC WITH A NULL DACL\n");
|
||||
|
||||
io.generic.level = RAW_OPEN_NTTRANS_CREATE;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.flags = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_STD_READ_CONTROL | SEC_STD_WRITE_DAC
|
||||
| SEC_STD_WRITE_OWNER;
|
||||
@ -512,7 +512,7 @@ static bool test_creator_sid(struct torture_context *tctx,
|
||||
printf("TESTING SID_CREATOR_OWNER\n");
|
||||
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.flags = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_STD_READ_CONTROL | SEC_STD_WRITE_DAC | SEC_STD_WRITE_OWNER;
|
||||
io.ntcreatex.in.create_options = 0;
|
||||
@ -748,7 +748,7 @@ static bool test_generic_bits(struct torture_context *tctx,
|
||||
printf("TESTING FILE GENERIC BITS\n");
|
||||
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.flags = 0;
|
||||
io.ntcreatex.in.access_mask =
|
||||
SEC_STD_READ_CONTROL |
|
||||
@ -913,7 +913,7 @@ static bool test_generic_bits(struct torture_context *tctx,
|
||||
printf("TESTING DIR GENERIC BITS\n");
|
||||
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.flags = 0;
|
||||
io.ntcreatex.in.access_mask =
|
||||
SEC_STD_READ_CONTROL |
|
||||
@ -1102,7 +1102,7 @@ static bool test_owner_bits(struct torture_context *tctx,
|
||||
printf("TESTING FILE OWNER BITS\n");
|
||||
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.flags = 0;
|
||||
io.ntcreatex.in.access_mask =
|
||||
SEC_STD_READ_CONTROL |
|
||||
@ -1334,7 +1334,7 @@ static bool test_inheritance(struct torture_context *tctx,
|
||||
printf("TESTING ACL INHERITANCE\n");
|
||||
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.flags = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
|
||||
io.ntcreatex.in.create_options = NTCREATEX_OPTIONS_DIRECTORY;
|
||||
@ -1655,7 +1655,7 @@ static bool test_inheritance_dynamic(struct torture_context *tctx,
|
||||
}
|
||||
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.flags = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
|
||||
io.ntcreatex.in.create_options = NTCREATEX_OPTIONS_DIRECTORY;
|
||||
@ -1848,7 +1848,7 @@ static bool test_sd_get_set(struct torture_context *tctx,
|
||||
sd->type |= SEC_DESC_SACL_PRESENT;
|
||||
sd->sacl = NULL;
|
||||
io.ntcreatex.level = RAW_OPEN_NTTRANS_CREATE;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.flags = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_GENERIC_ALL;
|
||||
io.ntcreatex.in.create_options = 0;
|
||||
|
@ -175,7 +175,7 @@ static bool test_session(struct smbcli_state *cli, struct torture_context *tctx)
|
||||
|
||||
printf("create a file using the new vuid\n");
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.flags = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
|
||||
io.ntcreatex.in.create_options = 0;
|
||||
@ -311,7 +311,7 @@ static bool test_tree(struct smbcli_state *cli, struct torture_context *tctx)
|
||||
|
||||
printf("create a file using the new tid\n");
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.flags = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
|
||||
io.ntcreatex.in.create_options = 0;
|
||||
@ -425,7 +425,7 @@ static bool test_tree_ulogoff(struct smbcli_state *cli, struct torture_context *
|
||||
|
||||
printf("create a file using vuid1\n");
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.flags = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
|
||||
io.ntcreatex.in.create_options = 0;
|
||||
@ -473,7 +473,7 @@ static bool test_tree_ulogoff(struct smbcli_state *cli, struct torture_context *
|
||||
|
||||
printf("create a file using vuid2\n");
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.flags = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
|
||||
io.ntcreatex.in.create_options = 0;
|
||||
@ -551,7 +551,7 @@ static bool test_pid_exit_only_sees_open(struct smbcli_state *cli, TALLOC_CTX *m
|
||||
printf("create a file using pid1\n");
|
||||
cli->session->pid = pid1;
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.flags = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
|
||||
io.ntcreatex.in.create_options = 0;
|
||||
@ -677,7 +677,7 @@ static bool test_pid_2sess(struct smbcli_state *cli, struct torture_context *tct
|
||||
printf("create a file using the vuid1\n");
|
||||
cli->session->vuid = vuid1;
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.flags = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
|
||||
io.ntcreatex.in.create_options = 0;
|
||||
@ -785,7 +785,7 @@ static bool test_pid_2tcon(struct smbcli_state *cli, struct torture_context *tct
|
||||
printf("create a file using the tid1\n");
|
||||
cli->tree->tid = tid1;
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.flags = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
|
||||
io.ntcreatex.in.create_options = 0;
|
||||
@ -816,7 +816,7 @@ static bool test_pid_2tcon(struct smbcli_state *cli, struct torture_context *tct
|
||||
printf("create a file using the tid2\n");
|
||||
cli->tree->tid = tid2;
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.flags = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
|
||||
io.ntcreatex.in.create_options = 0;
|
||||
|
@ -57,7 +57,7 @@ static bool test_eas(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
|
||||
printf("TESTING SETFILEINFO EA_SET\n");
|
||||
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.flags = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
|
||||
io.ntcreatex.in.create_options = 0;
|
||||
@ -282,7 +282,7 @@ static bool test_max_eas(struct smbcli_state *cli, struct torture_context *tctx)
|
||||
maxeadebug);
|
||||
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.flags = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
|
||||
io.ntcreatex.in.create_options = 0;
|
||||
@ -375,7 +375,7 @@ static bool test_nttrans_create(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
|
||||
printf("TESTING NTTRANS CREATE WITH EAS\n");
|
||||
|
||||
io.generic.level = RAW_OPEN_NTTRANS_CREATE;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.flags = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
|
||||
io.ntcreatex.in.create_options = 0;
|
||||
|
@ -53,7 +53,7 @@ static bool test_mux_open(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
|
||||
|
||||
printf("send first open\n");
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.flags = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_FILE_READ_DATA;
|
||||
io.ntcreatex.in.create_options = 0;
|
||||
|
@ -73,7 +73,7 @@ static bool test_notify_dir(struct smbcli_state *cli, struct smbcli_state *cli2,
|
||||
get a handle on the directory
|
||||
*/
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.flags = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_FILE_ALL;
|
||||
io.ntcreatex.in.create_options = NTCREATEX_OPTIONS_DIRECTORY;
|
||||
@ -310,7 +310,7 @@ static bool test_notify_recursive(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
|
||||
get a handle on the directory
|
||||
*/
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.flags = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_FILE_ALL;
|
||||
io.ntcreatex.in.create_options = NTCREATEX_OPTIONS_DIRECTORY;
|
||||
@ -441,7 +441,7 @@ static bool test_notify_mask_change(struct smbcli_state *cli, TALLOC_CTX *mem_ct
|
||||
get a handle on the directory
|
||||
*/
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.flags = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_FILE_ALL;
|
||||
io.ntcreatex.in.create_options = NTCREATEX_OPTIONS_DIRECTORY;
|
||||
@ -566,7 +566,7 @@ static bool test_notify_mask(struct smbcli_state *cli, struct torture_context *t
|
||||
get a handle on the directory
|
||||
*/
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.flags = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_FILE_ALL;
|
||||
io.ntcreatex.in.create_options = NTCREATEX_OPTIONS_DIRECTORY;
|
||||
@ -793,7 +793,7 @@ static bool test_notify_file(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
|
||||
printf("TESTING CHANGE NOTIFY ON FILES\n");
|
||||
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.flags = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
|
||||
io.ntcreatex.in.create_options = 0;
|
||||
@ -859,7 +859,7 @@ static bool test_notify_tdis(struct torture_context *tctx)
|
||||
get a handle on the directory
|
||||
*/
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.flags = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_FILE_ALL;
|
||||
io.ntcreatex.in.create_options = NTCREATEX_OPTIONS_DIRECTORY;
|
||||
@ -921,7 +921,7 @@ static bool test_notify_exit(struct torture_context *tctx)
|
||||
get a handle on the directory
|
||||
*/
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.flags = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_FILE_ALL;
|
||||
io.ntcreatex.in.create_options = NTCREATEX_OPTIONS_DIRECTORY;
|
||||
@ -982,7 +982,7 @@ static bool test_notify_ulogoff(struct torture_context *tctx)
|
||||
get a handle on the directory
|
||||
*/
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.flags = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_FILE_ALL;
|
||||
io.ntcreatex.in.create_options = NTCREATEX_OPTIONS_DIRECTORY;
|
||||
@ -1050,7 +1050,7 @@ static bool test_notify_tcp_dis(struct torture_context *tctx)
|
||||
get a handle on the directory
|
||||
*/
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.flags = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_FILE_ALL;
|
||||
io.ntcreatex.in.create_options = NTCREATEX_OPTIONS_DIRECTORY;
|
||||
@ -1104,7 +1104,7 @@ static bool test_notify_double(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
|
||||
get a handle on the directory
|
||||
*/
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.flags = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_FILE_ALL;
|
||||
io.ntcreatex.in.create_options = NTCREATEX_OPTIONS_DIRECTORY;
|
||||
@ -1197,7 +1197,7 @@ static bool test_notify_tree(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
|
||||
printf("TESTING CHANGE NOTIFY FOR DIFFERENT DEPTHS\n");
|
||||
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.flags = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_FILE_ALL;
|
||||
io.ntcreatex.in.create_options = NTCREATEX_OPTIONS_DIRECTORY;
|
||||
@ -1302,7 +1302,7 @@ static bool test_notify_overflow(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
|
||||
|
||||
/* get a handle on the directory */
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.flags = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_FILE_ALL;
|
||||
io.ntcreatex.in.create_options = NTCREATEX_OPTIONS_DIRECTORY;
|
||||
@ -1378,7 +1378,7 @@ static bool test_notify_basedir(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
|
||||
|
||||
/* get a handle on the directory */
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.flags = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_FILE_ALL;
|
||||
io.ntcreatex.in.create_options = NTCREATEX_OPTIONS_DIRECTORY;
|
||||
@ -1485,7 +1485,7 @@ static bool test_notify_tcon(struct smbcli_state *cli, struct torture_context *t
|
||||
get a handle on the directory
|
||||
*/
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.flags = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_FILE_ALL;
|
||||
io.ntcreatex.in.create_options = NTCREATEX_OPTIONS_DIRECTORY;
|
||||
|
@ -719,7 +719,7 @@ static bool test_ntcreatex(struct smbcli_state *cli, struct torture_context *tct
|
||||
/* reasonable default parameters */
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.flags = NTCREATEX_FLAGS_EXTENDED;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
|
||||
io.ntcreatex.in.alloc_size = 1024*1024;
|
||||
io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL;
|
||||
@ -900,7 +900,7 @@ static bool test_nttrans_create(struct smbcli_state *cli, struct torture_context
|
||||
/* reasonable default parameters */
|
||||
io.generic.level = RAW_OPEN_NTTRANS_CREATE;
|
||||
io.ntcreatex.in.flags = NTCREATEX_FLAGS_EXTENDED;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
|
||||
io.ntcreatex.in.alloc_size = 1024*1024;
|
||||
io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL;
|
||||
@ -1151,7 +1151,7 @@ static bool test_ntcreatex_brlocked(struct smbcli_state *cli, struct torture_con
|
||||
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.flags = NTCREATEX_FLAGS_EXTENDED;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.access_mask = 0x2019f;
|
||||
io.ntcreatex.in.alloc_size = 0;
|
||||
io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL;
|
||||
@ -1182,7 +1182,7 @@ static bool test_ntcreatex_brlocked(struct smbcli_state *cli, struct torture_con
|
||||
|
||||
io1.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io1.ntcreatex.in.flags = NTCREATEX_FLAGS_EXTENDED;
|
||||
io1.ntcreatex.in.root_fid = 0;
|
||||
io1.ntcreatex.in.root_fid.fnum = 0;
|
||||
io1.ntcreatex.in.access_mask = 0x20196;
|
||||
io1.ntcreatex.in.alloc_size = 0;
|
||||
io1.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL;
|
||||
@ -1560,7 +1560,7 @@ static bool test_raw_open_multi(struct torture_context *tctx)
|
||||
base ntcreatex parms
|
||||
*/
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
|
||||
io.ntcreatex.in.alloc_size = 0;
|
||||
io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL;
|
||||
@ -1652,7 +1652,7 @@ static bool test_open_for_delete(struct smbcli_state *cli, struct torture_contex
|
||||
/* reasonable default parameters */
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.flags = NTCREATEX_FLAGS_EXTENDED;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.alloc_size = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
|
||||
io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_READONLY;
|
||||
@ -1715,7 +1715,7 @@ static bool test_chained_ntcreatex_readx(struct smbcli_state *cli, struct tortur
|
||||
/* ntcreatex parameters */
|
||||
io.generic.level = RAW_OPEN_NTCREATEX_READX;
|
||||
io.ntcreatexreadx.in.flags = 0;
|
||||
io.ntcreatexreadx.in.root_fid = 0;
|
||||
io.ntcreatexreadx.in.root_fid.fnum = 0;
|
||||
io.ntcreatexreadx.in.access_mask = SEC_FILE_READ_DATA;
|
||||
io.ntcreatexreadx.in.alloc_size = 0;
|
||||
io.ntcreatexreadx.in.file_attr = FILE_ATTRIBUTE_NORMAL;
|
||||
|
@ -173,7 +173,7 @@ static void next_open(struct benchopen_state *state)
|
||||
DEBUG(2,("[%d] opening %u\n", state->client_num, state->pending_file_num));
|
||||
state->open_parms.ntcreatex.level = RAW_OPEN_NTCREATEX;
|
||||
state->open_parms.ntcreatex.in.flags = 0;
|
||||
state->open_parms.ntcreatex.in.root_fid = 0;
|
||||
state->open_parms.ntcreatex.in.root_fid.fnum = 0;
|
||||
state->open_parms.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
|
||||
state->open_parms.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL;
|
||||
state->open_parms.ntcreatex.in.alloc_size = 0;
|
||||
|
@ -280,7 +280,7 @@ static bool test_raw_oplock_exclusive1(struct torture_context *tctx, struct smbc
|
||||
base ntcreatex parms
|
||||
*/
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
|
||||
io.ntcreatex.in.alloc_size = 0;
|
||||
io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL;
|
||||
@ -347,7 +347,7 @@ static bool test_raw_oplock_exclusive2(struct torture_context *tctx, struct smbc
|
||||
base ntcreatex parms
|
||||
*/
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
|
||||
io.ntcreatex.in.alloc_size = 0;
|
||||
io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL;
|
||||
@ -445,7 +445,7 @@ static bool test_raw_oplock_exclusive3(struct torture_context *tctx, struct smbc
|
||||
base ntcreatex parms
|
||||
*/
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
|
||||
io.ntcreatex.in.alloc_size = 0;
|
||||
io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL;
|
||||
@ -510,7 +510,7 @@ static bool test_raw_oplock_exclusive4(struct torture_context *tctx, struct smbc
|
||||
base ntcreatex parms
|
||||
*/
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
|
||||
io.ntcreatex.in.alloc_size = 0;
|
||||
io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL;
|
||||
@ -576,7 +576,7 @@ static bool test_raw_oplock_exclusive5(struct torture_context *tctx, struct smbc
|
||||
base ntcreatex parms
|
||||
*/
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
|
||||
io.ntcreatex.in.alloc_size = 0;
|
||||
io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL;
|
||||
@ -650,7 +650,7 @@ static bool test_raw_oplock_exclusive6(struct torture_context *tctx, struct smbc
|
||||
base ntcreatex parms
|
||||
*/
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
|
||||
io.ntcreatex.in.alloc_size = 0;
|
||||
io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL;
|
||||
@ -719,7 +719,7 @@ static bool test_raw_oplock_batch1(struct torture_context *tctx, struct smbcli_s
|
||||
base ntcreatex parms
|
||||
*/
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
|
||||
io.ntcreatex.in.alloc_size = 0;
|
||||
io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL;
|
||||
@ -805,7 +805,7 @@ static bool test_raw_oplock_batch2(struct torture_context *tctx, struct smbcli_s
|
||||
base ntcreatex parms
|
||||
*/
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
|
||||
io.ntcreatex.in.alloc_size = 0;
|
||||
io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL;
|
||||
@ -884,7 +884,7 @@ static bool test_raw_oplock_batch3(struct torture_context *tctx, struct smbcli_s
|
||||
base ntcreatex parms
|
||||
*/
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
|
||||
io.ntcreatex.in.alloc_size = 0;
|
||||
io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL;
|
||||
@ -949,7 +949,7 @@ static bool test_raw_oplock_batch4(struct torture_context *tctx, struct smbcli_s
|
||||
base ntcreatex parms
|
||||
*/
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
|
||||
io.ntcreatex.in.alloc_size = 0;
|
||||
io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL;
|
||||
@ -1013,7 +1013,7 @@ static bool test_raw_oplock_batch5(struct torture_context *tctx, struct smbcli_s
|
||||
base ntcreatex parms
|
||||
*/
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
|
||||
io.ntcreatex.in.alloc_size = 0;
|
||||
io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL;
|
||||
@ -1080,7 +1080,7 @@ static bool test_raw_oplock_batch6(struct torture_context *tctx, struct smbcli_s
|
||||
base ntcreatex parms
|
||||
*/
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
|
||||
io.ntcreatex.in.alloc_size = 0;
|
||||
io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL;
|
||||
@ -1160,7 +1160,7 @@ static bool test_raw_oplock_batch7(struct torture_context *tctx, struct smbcli_s
|
||||
base ntcreatex parms
|
||||
*/
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
|
||||
io.ntcreatex.in.alloc_size = 0;
|
||||
io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL;
|
||||
@ -1231,7 +1231,7 @@ static bool test_raw_oplock_batch8(struct torture_context *tctx, struct smbcli_s
|
||||
base ntcreatex parms
|
||||
*/
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
|
||||
io.ntcreatex.in.alloc_size = 0;
|
||||
io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL;
|
||||
@ -1301,7 +1301,7 @@ static bool test_raw_oplock_batch9(struct torture_context *tctx, struct smbcli_s
|
||||
base ntcreatex parms
|
||||
*/
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
|
||||
io.ntcreatex.in.alloc_size = 0;
|
||||
io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL;
|
||||
@ -1406,7 +1406,7 @@ static bool test_raw_oplock_batch10(struct torture_context *tctx, struct smbcli_
|
||||
base ntcreatex parms
|
||||
*/
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
|
||||
io.ntcreatex.in.alloc_size = 0;
|
||||
io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL;
|
||||
@ -1502,7 +1502,7 @@ static bool test_raw_oplock_batch11(struct torture_context *tctx, struct smbcli_
|
||||
base ntcreatex parms
|
||||
*/
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
|
||||
io.ntcreatex.in.alloc_size = 0;
|
||||
io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL;
|
||||
@ -1578,7 +1578,7 @@ static bool test_raw_oplock_batch12(struct torture_context *tctx, struct smbcli_
|
||||
base ntcreatex parms
|
||||
*/
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
|
||||
io.ntcreatex.in.alloc_size = 0;
|
||||
io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL;
|
||||
@ -1655,7 +1655,7 @@ static bool test_raw_oplock_batch13(struct torture_context *tctx, struct smbcli_
|
||||
base ntcreatex parms
|
||||
*/
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
|
||||
io.ntcreatex.in.alloc_size = 0;
|
||||
io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL;
|
||||
@ -1731,7 +1731,7 @@ static bool test_raw_oplock_batch14(struct torture_context *tctx, struct smbcli_
|
||||
base ntcreatex parms
|
||||
*/
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
|
||||
io.ntcreatex.in.alloc_size = 0;
|
||||
io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL;
|
||||
@ -1808,7 +1808,7 @@ static bool test_raw_oplock_batch15(struct torture_context *tctx, struct smbcli_
|
||||
base ntcreatex parms
|
||||
*/
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
|
||||
io.ntcreatex.in.alloc_size = 0;
|
||||
io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL;
|
||||
@ -1883,7 +1883,7 @@ static bool test_raw_oplock_batch16(struct torture_context *tctx, struct smbcli_
|
||||
base ntcreatex parms
|
||||
*/
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
|
||||
io.ntcreatex.in.alloc_size = 0;
|
||||
io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL;
|
||||
@ -1963,7 +1963,7 @@ static bool test_raw_oplock_batch17(struct torture_context *tctx, struct smbcli_
|
||||
base ntcreatex parms
|
||||
*/
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
|
||||
io.ntcreatex.in.alloc_size = 0;
|
||||
io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL;
|
||||
@ -2035,7 +2035,7 @@ static bool test_raw_oplock_batch18(struct torture_context *tctx, struct smbcli_
|
||||
base ntcreatex parms
|
||||
*/
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
|
||||
io.ntcreatex.in.alloc_size = 0;
|
||||
io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL;
|
||||
@ -2110,7 +2110,7 @@ static bool test_raw_oplock_batch19(struct torture_context *tctx, struct smbcli_
|
||||
base ntcreatex parms
|
||||
*/
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
|
||||
io.ntcreatex.in.alloc_size = 0;
|
||||
io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL;
|
||||
@ -2216,7 +2216,7 @@ bool test_trans2rename(struct torture_context *tctx, struct smbcli_state *cli1,
|
||||
base ntcreatex parms
|
||||
*/
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
|
||||
io.ntcreatex.in.alloc_size = 0;
|
||||
io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL;
|
||||
@ -2320,7 +2320,7 @@ bool test_nttransrename(struct torture_context *tctx, struct smbcli_state *cli1)
|
||||
base ntcreatex parms
|
||||
*/
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
|
||||
io.ntcreatex.in.alloc_size = 0;
|
||||
io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL;
|
||||
@ -2442,7 +2442,7 @@ static bool test_raw_oplock_batch20(struct torture_context *tctx, struct smbcli_
|
||||
base ntcreatex parms
|
||||
*/
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
|
||||
io.ntcreatex.in.alloc_size = 0;
|
||||
io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL;
|
||||
@ -2572,7 +2572,7 @@ static bool test_raw_oplock_batch21(struct torture_context *tctx, struct smbcli_
|
||||
base ntcreatex parms
|
||||
*/
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
|
||||
io.ntcreatex.in.alloc_size = 0;
|
||||
io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL;
|
||||
@ -2646,7 +2646,7 @@ static bool test_raw_oplock_batch22(struct torture_context *tctx, struct smbcli_
|
||||
base ntcreatex parms
|
||||
*/
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
|
||||
io.ntcreatex.in.alloc_size = 0;
|
||||
io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL;
|
||||
@ -2741,7 +2741,7 @@ static bool test_raw_oplock_batch23(struct torture_context *tctx, struct smbcli_
|
||||
base ntcreatex parms
|
||||
*/
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
|
||||
io.ntcreatex.in.alloc_size = 0;
|
||||
io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL;
|
||||
@ -2829,7 +2829,7 @@ static bool test_raw_oplock_batch24(struct torture_context *tctx, struct smbcli_
|
||||
base ntcreatex parms
|
||||
*/
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
|
||||
io.ntcreatex.in.alloc_size = 0;
|
||||
io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL;
|
||||
@ -2902,7 +2902,7 @@ static bool test_raw_oplock_batch25(struct torture_context *tctx,
|
||||
base ntcreatex parms
|
||||
*/
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
|
||||
io.ntcreatex.in.alloc_size = 0;
|
||||
io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL;
|
||||
@ -3010,7 +3010,7 @@ static bool test_raw_oplock_stream1(struct torture_context *tctx,
|
||||
|
||||
/* Setup generic open parameters. */
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.access_mask = (SEC_FILE_READ_DATA|SEC_FILE_WRITE_DATA|
|
||||
SEC_FILE_APPEND_DATA|SEC_STD_READ_CONTROL);
|
||||
io.ntcreatex.in.create_options = 0;
|
||||
@ -3149,7 +3149,7 @@ static bool test_raw_oplock_doc(struct torture_context *tctx,
|
||||
base ntcreatex parms
|
||||
*/
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
|
||||
io.ntcreatex.in.alloc_size = 0;
|
||||
io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL;
|
||||
@ -3212,7 +3212,7 @@ static bool test_raw_oplock_brl1(struct torture_context *tctx,
|
||||
base ntcreatex parms
|
||||
*/
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_READ |
|
||||
SEC_RIGHTS_FILE_WRITE;
|
||||
io.ntcreatex.in.alloc_size = 0;
|
||||
@ -3323,7 +3323,7 @@ static bool test_raw_oplock_brl2(struct torture_context *tctx, struct smbcli_sta
|
||||
base ntcreatex parms
|
||||
*/
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_READ |
|
||||
SEC_RIGHTS_FILE_WRITE;
|
||||
io.ntcreatex.in.alloc_size = 0;
|
||||
@ -3416,7 +3416,7 @@ static bool test_raw_oplock_brl3(struct torture_context *tctx,
|
||||
base ntcreatex parms
|
||||
*/
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_READ |
|
||||
SEC_RIGHTS_FILE_WRITE;
|
||||
io.ntcreatex.in.alloc_size = 0;
|
||||
@ -3577,7 +3577,7 @@ bool torture_bench_oplock(struct torture_context *torture)
|
||||
}
|
||||
|
||||
io.ntcreatex.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
|
||||
io.ntcreatex.in.alloc_size = 0;
|
||||
io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL;
|
||||
@ -3703,7 +3703,7 @@ bool torture_hold_oplock(struct torture_context *torture,
|
||||
char c = 1;
|
||||
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
|
||||
io.ntcreatex.in.alloc_size = 0;
|
||||
io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL;
|
||||
|
@ -815,7 +815,7 @@ static bool test_read_for_execute(struct torture_context *tctx,
|
||||
printf("Testing RAW_READ_READX with read_for_execute\n");
|
||||
|
||||
op.generic.level = RAW_OPEN_NTCREATEX;
|
||||
op.ntcreatex.in.root_fid = 0;
|
||||
op.ntcreatex.in.root_fid.fnum = 0;
|
||||
op.ntcreatex.in.flags = 0;
|
||||
op.ntcreatex.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
|
||||
op.ntcreatex.in.create_options = 0;
|
||||
@ -846,7 +846,7 @@ static bool test_read_for_execute(struct torture_context *tctx,
|
||||
|
||||
printf("open file with SEC_FILE_EXECUTE\n");
|
||||
op.generic.level = RAW_OPEN_NTCREATEX;
|
||||
op.ntcreatex.in.root_fid = 0;
|
||||
op.ntcreatex.in.root_fid.fnum = 0;
|
||||
op.ntcreatex.in.flags = 0;
|
||||
op.ntcreatex.in.access_mask = SEC_FILE_EXECUTE;
|
||||
op.ntcreatex.in.create_options = 0;
|
||||
@ -893,7 +893,7 @@ static bool test_read_for_execute(struct torture_context *tctx,
|
||||
|
||||
printf("open file with SEC_FILE_READ_DATA\n");
|
||||
op.generic.level = RAW_OPEN_NTCREATEX;
|
||||
op.ntcreatex.in.root_fid = 0;
|
||||
op.ntcreatex.in.root_fid.fnum = 0;
|
||||
op.ntcreatex.in.flags = 0;
|
||||
op.ntcreatex.in.access_mask = SEC_FILE_READ_DATA;
|
||||
op.ntcreatex.in.create_options = 0;
|
||||
|
@ -67,7 +67,7 @@ static bool test_mv(struct torture_context *tctx,
|
||||
torture_comment(tctx, "Trying simple rename\n");
|
||||
|
||||
op.generic.level = RAW_OPEN_NTCREATEX;
|
||||
op.ntcreatex.in.root_fid = 0;
|
||||
op.ntcreatex.in.root_fid.fnum = 0;
|
||||
op.ntcreatex.in.flags = 0;
|
||||
op.ntcreatex.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
|
||||
op.ntcreatex.in.create_options = 0;
|
||||
@ -208,7 +208,7 @@ static bool test_osxrename(struct torture_context *tctx,
|
||||
return false;
|
||||
}
|
||||
op.generic.level = RAW_OPEN_NTCREATEX;
|
||||
op.ntcreatex.in.root_fid = 0;
|
||||
op.ntcreatex.in.root_fid.fnum = 0;
|
||||
op.ntcreatex.in.flags = 0;
|
||||
op.ntcreatex.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
|
||||
op.ntcreatex.in.create_options = 0;
|
||||
@ -577,7 +577,7 @@ static bool test_dir_rename(struct torture_context *tctx, struct smbcli_state *c
|
||||
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.flags = NTCREATEX_FLAGS_EXTENDED;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.alloc_size = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
|
||||
io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL;
|
||||
|
@ -90,7 +90,7 @@ bool torture_samba3_checkfsp(struct torture_context *torture)
|
||||
union smb_open io;
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.flags = NTCREATEX_FLAGS_EXTENDED;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.security_flags = 0;
|
||||
io.ntcreatex.in.open_disposition = NTCREATEX_DISP_CREATE;
|
||||
io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
|
||||
@ -304,7 +304,7 @@ static NTSTATUS raw_smbcli_ntcreate(struct smbcli_tree *tree, const char *fname,
|
||||
memset(&io, '\0', sizeof(io));
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.flags = NTCREATEX_FLAGS_EXTENDED;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
|
||||
io.ntcreatex.in.alloc_size = 0;
|
||||
io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL;
|
||||
@ -887,7 +887,7 @@ bool torture_samba3_rootdirfid(struct torture_context *tctx)
|
||||
ZERO_STRUCT(io);
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.flags = NTCREATEX_FLAGS_EXTENDED;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.security_flags = 0;
|
||||
io.ntcreatex.in.access_mask =
|
||||
SEC_STD_SYNCHRONIZE | SEC_FILE_EXECUTE;
|
||||
@ -912,7 +912,7 @@ bool torture_samba3_rootdirfid(struct torture_context *tctx)
|
||||
io.ntcreatex.in.flags =
|
||||
NTCREATEX_FLAGS_REQUEST_OPLOCK
|
||||
| NTCREATEX_FLAGS_REQUEST_BATCH_OPLOCK;
|
||||
io.ntcreatex.in.root_fid = dnum;
|
||||
io.ntcreatex.in.root_fid.fnum = dnum;
|
||||
io.ntcreatex.in.security_flags = 0;
|
||||
io.ntcreatex.in.open_disposition = NTCREATEX_DISP_OVERWRITE_IF;
|
||||
io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
|
||||
@ -961,7 +961,7 @@ bool torture_samba3_oplock_logoff(struct torture_context *tctx)
|
||||
ZERO_STRUCT(io);
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.flags = NTCREATEX_FLAGS_EXTENDED;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.security_flags = 0;
|
||||
io.ntcreatex.in.access_mask =
|
||||
SEC_STD_SYNCHRONIZE | SEC_FILE_EXECUTE;
|
||||
|
@ -221,7 +221,7 @@ static bool test_stream_dir(struct torture_context *tctx,
|
||||
|
||||
printf("(%s) opening non-existant directory stream\n", __location__);
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.flags = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_FILE_WRITE_DATA;
|
||||
io.ntcreatex.in.create_options = NTCREATEX_OPTIONS_DIRECTORY;
|
||||
@ -237,7 +237,7 @@ static bool test_stream_dir(struct torture_context *tctx,
|
||||
|
||||
printf("(%s) opening basedir stream\n", __location__);
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.flags = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_FILE_WRITE_DATA;
|
||||
io.ntcreatex.in.create_options = NTCREATEX_OPTIONS_DIRECTORY;
|
||||
@ -253,7 +253,7 @@ static bool test_stream_dir(struct torture_context *tctx,
|
||||
|
||||
printf("(%s) opening basedir ::$DATA stream\n", __location__);
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.flags = 0x10;
|
||||
io.ntcreatex.in.access_mask = SEC_FILE_WRITE_DATA;
|
||||
io.ntcreatex.in.create_options = 0;
|
||||
@ -297,7 +297,7 @@ static bool test_stream_io(struct torture_context *tctx,
|
||||
|
||||
printf("(%s) creating a stream on a non-existant file\n", __location__);
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.flags = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_FILE_WRITE_DATA;
|
||||
io.ntcreatex.in.create_options = 0;
|
||||
@ -434,7 +434,7 @@ static bool test_stream_sharemodes(struct torture_context *tctx,
|
||||
|
||||
printf("(%s) testing stream share mode conflicts\n", __location__);
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.flags = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_FILE_WRITE_DATA;
|
||||
io.ntcreatex.in.create_options = 0;
|
||||
@ -523,7 +523,7 @@ static bool test_stream_delete(struct torture_context *tctx,
|
||||
|
||||
printf("(%s) opening non-existant file stream\n", __location__);
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.flags = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_FILE_READ_DATA|SEC_FILE_WRITE_DATA;
|
||||
io.ntcreatex.in.create_options = 0;
|
||||
@ -698,7 +698,7 @@ static bool test_stream_names(struct torture_context *tctx,
|
||||
|
||||
printf("(%s) testing stream names\n", __location__);
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.flags = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_FILE_WRITE_DATA;
|
||||
io.ntcreatex.in.create_options = 0;
|
||||
@ -966,7 +966,7 @@ static bool test_stream_names2(struct torture_context *tctx,
|
||||
|
||||
printf("(%s) testing stream names\n", __location__);
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.flags = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_FILE_WRITE_DATA;
|
||||
io.ntcreatex.in.create_options = 0;
|
||||
@ -1060,7 +1060,7 @@ static bool test_stream_rename(struct torture_context *tctx,
|
||||
|
||||
printf("(%s) testing stream renames\n", __location__);
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.flags = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_FILE_READ_ATTRIBUTE |
|
||||
SEC_FILE_WRITE_ATTRIBUTE |
|
||||
@ -1135,7 +1135,7 @@ static bool test_stream_rename2(struct torture_context *tctx,
|
||||
sname2 = talloc_asprintf(mem_ctx, "%s:%s", fname1, "Stream Two");
|
||||
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.flags = 0;
|
||||
io.ntcreatex.in.access_mask = (SEC_FILE_READ_DATA|SEC_FILE_WRITE_DATA|
|
||||
SEC_STD_DELETE|SEC_FILE_APPEND_DATA|SEC_STD_READ_CONTROL);
|
||||
@ -1318,7 +1318,7 @@ static bool create_file_with_stream(struct torture_context *tctx,
|
||||
|
||||
/* Create a file with a stream */
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.flags = 0;
|
||||
io.ntcreatex.in.access_mask = (SEC_FILE_READ_DATA|SEC_FILE_WRITE_DATA|
|
||||
SEC_FILE_APPEND_DATA|SEC_STD_READ_CONTROL);
|
||||
@ -1365,7 +1365,7 @@ static bool test_stream_create_disposition(struct torture_context *tctx,
|
||||
|
||||
/* Open the base file with OPEN */
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.flags = 0;
|
||||
io.ntcreatex.in.access_mask = (SEC_FILE_READ_DATA|SEC_FILE_WRITE_DATA|
|
||||
SEC_FILE_APPEND_DATA|SEC_STD_READ_CONTROL);
|
||||
@ -1573,7 +1573,7 @@ static bool test_stream_attributes(struct torture_context *tctx,
|
||||
/* Now open the stream name. */
|
||||
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.flags = 0;
|
||||
io.ntcreatex.in.access_mask = (SEC_FILE_READ_DATA|SEC_FILE_WRITE_DATA|
|
||||
SEC_FILE_APPEND_DATA|SEC_STD_READ_CONTROL|SEC_FILE_WRITE_ATTRIBUTE);
|
||||
|
@ -327,7 +327,7 @@ static bool test_delete_on_close(struct torture_context *tctx,
|
||||
smbcli_close(cli->tree, fnum2);
|
||||
|
||||
op.generic.level = RAW_OPEN_NTCREATEX;
|
||||
op.ntcreatex.in.root_fid = 0;
|
||||
op.ntcreatex.in.root_fid.fnum = 0;
|
||||
op.ntcreatex.in.flags = 0;
|
||||
op.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
|
||||
op.ntcreatex.in.create_options = NTCREATEX_OPTIONS_DIRECTORY |NTCREATEX_OPTIONS_DELETE_ON_CLOSE;
|
||||
@ -359,7 +359,7 @@ static bool test_delete_on_close(struct torture_context *tctx,
|
||||
smbcli_close(cli->tree, fnum2);
|
||||
|
||||
op.generic.level = RAW_OPEN_NTCREATEX;
|
||||
op.ntcreatex.in.root_fid = 0;
|
||||
op.ntcreatex.in.root_fid.fnum = 0;
|
||||
op.ntcreatex.in.flags = 0;
|
||||
op.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
|
||||
op.ntcreatex.in.create_options = NTCREATEX_OPTIONS_DIRECTORY |NTCREATEX_OPTIONS_DELETE_ON_CLOSE;
|
||||
@ -394,7 +394,7 @@ static bool test_delete_on_close(struct torture_context *tctx,
|
||||
/* we have a dir with a file in it, no handles open */
|
||||
|
||||
op.generic.level = RAW_OPEN_NTCREATEX;
|
||||
op.ntcreatex.in.root_fid = 0;
|
||||
op.ntcreatex.in.root_fid.fnum = 0;
|
||||
op.ntcreatex.in.flags = 0;
|
||||
op.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
|
||||
op.ntcreatex.in.create_options = NTCREATEX_OPTIONS_DIRECTORY |NTCREATEX_OPTIONS_DELETE_ON_CLOSE;
|
||||
|
@ -61,7 +61,7 @@ NTSTATUS create_directory_handle(struct smbcli_tree *tree, const char *dname, in
|
||||
mem_ctx = talloc_named_const(tree, 0, "create_directory_handle");
|
||||
|
||||
io.generic.level = RAW_OPEN_NTCREATEX;
|
||||
io.ntcreatex.in.root_fid = 0;
|
||||
io.ntcreatex.in.root_fid.fnum = 0;
|
||||
io.ntcreatex.in.flags = 0;
|
||||
io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
|
||||
io.ntcreatex.in.create_options = NTCREATEX_OPTIONS_DIRECTORY;
|
||||
|
Loading…
x
Reference in New Issue
Block a user