diff options
author | Andrew Tridgell <tridge@samba.org> | 2009-10-15 18:26:19 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2009-10-15 20:03:00 +1100 |
commit | 3c028ff88b7f8b4a19a058ee44aeb42c10f4b398 (patch) | |
tree | ddac33c24d3f8c62c98e512fcbd240d1a094f5ca /source4 | |
parent | c73ba89112dda50e1828e11c87f8006bc4968546 (diff) | |
download | samba-3c028ff88b7f8b4a19a058ee44aeb42c10f4b398.tar.gz samba-3c028ff88b7f8b4a19a058ee44aeb42c10f4b398.tar.bz2 samba-3c028ff88b7f8b4a19a058ee44aeb42c10f4b398.zip |
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.
Diffstat (limited to 'source4')
29 files changed, 139 insertions, 139 deletions
diff --git a/source4/libcli/clifile.c b/source4/libcli/clifile.c index 2cf174060b..b76bdc015f 100644 --- a/source4/libcli/clifile.c +++ b/source4/libcli/clifile.c @@ -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; diff --git a/source4/libcli/raw/interfaces.h b/source4/libcli/raw/interfaces.h index f7d64d04cc..af2158cc16 100644 --- a/source4/libcli/raw/interfaces.h +++ b/source4/libcli/raw/interfaces.h @@ -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; diff --git a/source4/libcli/raw/rawfile.c b/source4/libcli/raw/rawfile.c index ea254a5bf2..d8925b019d 100644 --- a/source4/libcli/raw/rawfile.c +++ b/source4/libcli/raw/rawfile.c @@ -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); diff --git a/source4/libcli/smb_composite/appendacl.c b/source4/libcli/smb_composite/appendacl.c index 69ed62a106..c1a964f151 100644 --- a/source4/libcli/smb_composite/appendacl.c +++ b/source4/libcli/smb_composite/appendacl.c @@ -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; diff --git a/source4/librpc/rpc/dcerpc_smb.c b/source4/librpc/rpc/dcerpc_smb.c index f4e6b8c3dd..947a9c5f65 100644 --- a/source4/librpc/rpc/dcerpc_smb.c +++ b/source4/librpc/rpc/dcerpc_smb.c @@ -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 | diff --git a/source4/ntvfs/ntvfs_generic.c b/source4/ntvfs/ntvfs_generic.c index 5838178d9e..6e2e075f1e 100644 --- a/source4/ntvfs/ntvfs_generic.c +++ b/source4/ntvfs/ntvfs_generic.c @@ -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; diff --git a/source4/smb_server/smb/nttrans.c b/source4/smb_server/smb/nttrans.c index e739f391b9..6a46e6eb7d 100644 --- a/source4/smb_server/smb/nttrans.c +++ b/source4/smb_server/smb/nttrans.c @@ -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); diff --git a/source4/smb_server/smb/reply.c b/source4/smb_server/smb/reply.c index 104caca446..2c99a38575 100644 --- a/source4/smb_server/smb/reply.c +++ b/source4/smb_server/smb/reply.c @@ -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); diff --git a/source4/torture/basic/base.c b/source4/torture/basic/base.c index 892ca30bc1..355c569bb3 100644 --- a/source4/torture/basic/base.c +++ b/source4/torture/basic/base.c @@ -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; diff --git a/source4/torture/basic/charset.c b/source4/torture/basic/charset.c index 5ac299dbbe..2f50376f87 100644 --- a/source4/torture/basic/charset.c +++ b/source4/torture/basic/charset.c @@ -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; diff --git a/source4/torture/basic/denytest.c b/source4/torture/basic/denytest.c index 0802896d7a..8decf094de 100644 --- a/source4/torture/basic/denytest.c +++ b/source4/torture/basic/denytest.c @@ -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; diff --git a/source4/torture/basic/disconnect.c b/source4/torture/basic/disconnect.c index 89e05d6839..0de0910512 100644 --- a/source4/torture/basic/disconnect.c +++ b/source4/torture/basic/disconnect.c @@ -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; diff --git a/source4/torture/basic/unlink.c b/source4/torture/basic/unlink.c index 9e13021d20..5d0e4f6964 100644 --- a/source4/torture/basic/unlink.c +++ b/source4/torture/basic/unlink.c @@ -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; diff --git a/source4/torture/gentest.c b/source4/torture/gentest.c index be02f33378..3d23ad85bc 100644 --- a/source4/torture/gentest.c +++ b/source4/torture/gentest.c @@ -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])); diff --git a/source4/torture/nbench/nbio.c b/source4/torture/nbench/nbio.c index bf594088cd..0f811ab56e 100644 --- a/source4/torture/nbench/nbio.c +++ b/source4/torture/nbench/nbio.c @@ -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; diff --git a/source4/torture/raw/acls.c b/source4/torture/raw/acls.c index 48dec6e561..3d3aae4bb9 100644 --- a/source4/torture/raw/acls.c +++ b/source4/torture/raw/acls.c @@ -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; diff --git a/source4/torture/raw/context.c b/source4/torture/raw/context.c index a9d36b7788..0e0851e741 100644 --- a/source4/torture/raw/context.c +++ b/source4/torture/raw/context.c @@ -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; diff --git a/source4/torture/raw/eas.c b/source4/torture/raw/eas.c index 49a81dd534..32ceba119a 100644 --- a/source4/torture/raw/eas.c +++ b/source4/torture/raw/eas.c @@ -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; diff --git a/source4/torture/raw/mux.c b/source4/torture/raw/mux.c index 5b5db3a557..19cb4ce422 100644 --- a/source4/torture/raw/mux.c +++ b/source4/torture/raw/mux.c @@ -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; diff --git a/source4/torture/raw/notify.c b/source4/torture/raw/notify.c index 33d8c86570..8be7e06dff 100644 --- a/source4/torture/raw/notify.c +++ b/source4/torture/raw/notify.c @@ -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; diff --git a/source4/torture/raw/open.c b/source4/torture/raw/open.c index 49540d8b53..73f9c3f839 100644 --- a/source4/torture/raw/open.c +++ b/source4/torture/raw/open.c @@ -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; diff --git a/source4/torture/raw/openbench.c b/source4/torture/raw/openbench.c index bdad2b16a5..2716f6a528 100644 --- a/source4/torture/raw/openbench.c +++ b/source4/torture/raw/openbench.c @@ -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; diff --git a/source4/torture/raw/oplock.c b/source4/torture/raw/oplock.c index 8623042c45..1b9d8e95c9 100644 --- a/source4/torture/raw/oplock.c +++ b/source4/torture/raw/oplock.c @@ -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; diff --git a/source4/torture/raw/read.c b/source4/torture/raw/read.c index f99da8fb1e..ea1fc125a7 100644 --- a/source4/torture/raw/read.c +++ b/source4/torture/raw/read.c @@ -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; diff --git a/source4/torture/raw/rename.c b/source4/torture/raw/rename.c index 5402feda55..cf04769764 100644 --- a/source4/torture/raw/rename.c +++ b/source4/torture/raw/rename.c @@ -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; diff --git a/source4/torture/raw/samba3misc.c b/source4/torture/raw/samba3misc.c index 6d6eabce2d..e8dc12fd40 100644 --- a/source4/torture/raw/samba3misc.c +++ b/source4/torture/raw/samba3misc.c @@ -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; diff --git a/source4/torture/raw/streams.c b/source4/torture/raw/streams.c index 6c5dc85a10..5c6bd63157 100644 --- a/source4/torture/raw/streams.c +++ b/source4/torture/raw/streams.c @@ -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); diff --git a/source4/torture/raw/unlink.c b/source4/torture/raw/unlink.c index 1058a58d9d..699bc30775 100644 --- a/source4/torture/raw/unlink.c +++ b/source4/torture/raw/unlink.c @@ -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; diff --git a/source4/torture/util_smb.c b/source4/torture/util_smb.c index 99b00d2329..7d3d04cdbb 100644 --- a/source4/torture/util_smb.c +++ b/source4/torture/util_smb.c @@ -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; |