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/torture/raw | |
parent | c73ba89112dda50e1828e11c87f8006bc4968546 (diff) | |
download | samba-3c028ff88b7f8b4a19a058ee44aeb42c10f4b398.tar.gz |
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/torture/raw')
-rw-r--r-- | source4/torture/raw/acls.c | 20 | ||||
-rw-r--r-- | source4/torture/raw/context.c | 16 | ||||
-rw-r--r-- | source4/torture/raw/eas.c | 6 | ||||
-rw-r--r-- | source4/torture/raw/mux.c | 2 | ||||
-rw-r--r-- | source4/torture/raw/notify.c | 28 | ||||
-rw-r--r-- | source4/torture/raw/open.c | 14 | ||||
-rw-r--r-- | source4/torture/raw/openbench.c | 2 | ||||
-rw-r--r-- | source4/torture/raw/oplock.c | 80 | ||||
-rw-r--r-- | source4/torture/raw/read.c | 6 | ||||
-rw-r--r-- | source4/torture/raw/rename.c | 6 | ||||
-rw-r--r-- | source4/torture/raw/samba3misc.c | 10 | ||||
-rw-r--r-- | source4/torture/raw/streams.c | 26 | ||||
-rw-r--r-- | source4/torture/raw/unlink.c | 6 |
13 files changed, 111 insertions, 111 deletions
diff --git a/source4/torture/raw/acls.c b/source4/torture/raw/acls.c index 48dec6e5613..3d3aae4bb9b 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 a9d36b7788c..0e0851e7412 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 49a81dd5345..32ceba119a2 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 5b5db3a5572..19cb4ce422e 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 33d8c865704..8be7e06dff9 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 49540d8b532..73f9c3f839e 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 bdad2b16a5e..2716f6a5285 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 8623042c458..1b9d8e95c92 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 f99da8fb1ee..ea1fc125a79 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 5402feda555..cf04769764f 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 6d6eabce2d7..e8dc12fd402 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 6c5dc85a105..5c6bd63157c 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 1058a58d9d0..699bc307752 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; |