summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-03-10 20:49:20 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:56:57 -0500
commit307e43bb5628e8b53a930c2928279af994281ba5 (patch)
tree68fa41cf4e697ae94b23cedab5eb7013932fc88d /source4/torture
parent2b3767b1fe7744f0412531e1522e1d5af5dc39c6 (diff)
downloadsamba-307e43bb5628e8b53a930c2928279af994281ba5.tar.gz
samba-307e43bb5628e8b53a930c2928279af994281ba5.tar.bz2
samba-307e43bb5628e8b53a930c2928279af994281ba5.zip
r14173: change smb interface structures to always use
a union smb_file, to abtract - const char *path fot qpathinfo and setpathinfo - uint16_t fnum for SMB - smb2_handle handle for SMB2 the idea is to later add a struct ntvfs_handle *ntvfs so that the ntvfs subsystem don't need to know the difference between SMB and SMB2 metze (This used to be commit 2ef3f5970901b5accdb50f0d0115b5d46b0c788f)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/basic/delaywrite.c24
-rw-r--r--source4/torture/basic/delete.c4
-rw-r--r--source4/torture/basic/denytest.c24
-rw-r--r--source4/torture/basic/disconnect.c2
-rw-r--r--source4/torture/gentest.c106
-rw-r--r--source4/torture/nbench/nbio.c30
-rw-r--r--source4/torture/raw/acls.c114
-rw-r--r--source4/torture/raw/chkpath.c8
-rw-r--r--source4/torture/raw/close.c22
-rw-r--r--source4/torture/raw/context.c18
-rw-r--r--source4/torture/raw/eas.c8
-rw-r--r--source4/torture/raw/ioctl.c14
-rw-r--r--source4/torture/raw/lock.c20
-rw-r--r--source4/torture/raw/mux.c12
-rw-r--r--source4/torture/raw/notify.c60
-rw-r--r--source4/torture/raw/open.c98
-rw-r--r--source4/torture/raw/oplock.c54
-rw-r--r--source4/torture/raw/qfileinfo.c4
-rw-r--r--source4/torture/raw/read.c32
-rw-r--r--source4/torture/raw/rename.c20
-rw-r--r--source4/torture/raw/search.c12
-rw-r--r--source4/torture/raw/seek.c80
-rw-r--r--source4/torture/raw/setfileinfo.c18
-rw-r--r--source4/torture/raw/streams.c10
-rw-r--r--source4/torture/raw/unlink.c92
-rw-r--r--source4/torture/raw/write.c38
-rw-r--r--source4/torture/smb2/find.c4
-rw-r--r--source4/torture/smb2/getinfo.c12
-rw-r--r--source4/torture/smb2/setinfo.c2
-rw-r--r--source4/torture/smb2/util.c6
-rw-r--r--source4/torture/torture.c2
-rw-r--r--source4/torture/torture_util.c14
32 files changed, 482 insertions, 482 deletions
diff --git a/source4/torture/basic/delaywrite.c b/source4/torture/basic/delaywrite.c
index 2c26f21ddc..2a41508bcc 100644
--- a/source4/torture/basic/delaywrite.c
+++ b/source4/torture/basic/delaywrite.c
@@ -54,7 +54,7 @@ static BOOL test_delayed_write_update(struct smbcli_state *cli, TALLOC_CTX *mem_
}
finfo1.basic_info.level = RAW_FILEINFO_BASIC_INFO;
- finfo1.basic_info.in.fnum = fnum1;
+ finfo1.basic_info.file.fnum = fnum1;
finfo2 = finfo1;
status = smb_raw_fileinfo(cli->tree, mem_ctx, &finfo1);
@@ -129,7 +129,7 @@ static BOOL test_delayed_write_update2(struct smbcli_state *cli, TALLOC_CTX *mem
BOOL ret = True;
ssize_t written;
time_t t;
- struct smb_flush flsh;
+ union smb_flush flsh;
printf("Testing delayed update of write time using 2 connections\n");
@@ -148,7 +148,7 @@ static BOOL test_delayed_write_update2(struct smbcli_state *cli, TALLOC_CTX *mem
}
finfo1.basic_info.level = RAW_FILEINFO_BASIC_INFO;
- finfo1.basic_info.in.fnum = fnum1;
+ finfo1.basic_info.file.fnum = fnum1;
finfo2 = finfo1;
status = smb_raw_fileinfo(cli->tree, mem_ctx, &finfo1);
@@ -195,7 +195,7 @@ static BOOL test_delayed_write_update2(struct smbcli_state *cli, TALLOC_CTX *mem
t = time(NULL);
while (time(NULL) < t+120) {
- finfo2.basic_info.in.fname = fname;
+ finfo2.basic_info.file.path = fname;
status = smb_raw_pathinfo(cli2->tree, mem_ctx, &finfo2);
@@ -223,7 +223,7 @@ static BOOL test_delayed_write_update2(struct smbcli_state *cli, TALLOC_CTX *mem
/* Now try a write to see if the write time gets reset. */
finfo1.basic_info.level = RAW_FILEINFO_BASIC_INFO;
- finfo1.basic_info.in.fnum = fnum1;
+ finfo1.basic_info.file.fnum = fnum1;
finfo2 = finfo1;
status = smb_raw_fileinfo(cli->tree, mem_ctx, &finfo1);
@@ -252,7 +252,7 @@ static BOOL test_delayed_write_update2(struct smbcli_state *cli, TALLOC_CTX *mem
printf("Doing flush after write\n");
- flsh.in.fnum = fnum1;
+ flsh.flush.file.fnum = fnum1;
status = smb_raw_flush(cli->tree, &flsh);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0, ("smbflush failed: %s\n", nt_errstr(status)));
@@ -330,7 +330,7 @@ static BOOL test_delayed_write_update2(struct smbcli_state *cli, TALLOC_CTX *mem
}
finfo1.basic_info.level = RAW_FILEINFO_BASIC_INFO;
- finfo1.basic_info.in.fnum = fnum2;
+ finfo1.basic_info.file.fnum = fnum2;
finfo2 = finfo1;
status = smb_raw_fileinfo(cli->tree, mem_ctx, &finfo2);
@@ -384,7 +384,7 @@ static BOOL test_delayed_write_update2(struct smbcli_state *cli, TALLOC_CTX *mem
}
finfo1.basic_info.level = RAW_FILEINFO_BASIC_INFO;
- finfo1.basic_info.in.fnum = fnum1;
+ finfo1.basic_info.file.fnum = fnum1;
finfo2 = finfo1;
status = smb_raw_fileinfo(cli->tree, mem_ctx, &finfo1);
@@ -409,7 +409,7 @@ static BOOL test_delayed_write_update2(struct smbcli_state *cli, TALLOC_CTX *mem
}
finfo1.basic_info.level = RAW_FILEINFO_BASIC_INFO;
- finfo1.basic_info.in.fnum = fnum1;
+ finfo1.basic_info.file.fnum = fnum1;
finfo2 = finfo1;
status = smb_raw_fileinfo(cli->tree, mem_ctx, &finfo2);
@@ -502,7 +502,7 @@ static BOOL test_finfo_after_write(struct smbcli_state *cli, TALLOC_CTX *mem_ctx
}
finfo1.basic_info.level = RAW_FILEINFO_BASIC_INFO;
- finfo1.basic_info.in.fnum = fnum1;
+ finfo1.basic_info.file.fnum = fnum1;
status = smb_raw_fileinfo(cli->tree, mem_ctx, &finfo1);
@@ -545,7 +545,7 @@ static BOOL test_finfo_after_write(struct smbcli_state *cli, TALLOC_CTX *mem_ctx
}
finfo2.basic_info.level = RAW_FILEINFO_BASIC_INFO;
- finfo2.basic_info.in.fname = fname;
+ finfo2.basic_info.file.path = fname;
status = smb_raw_pathinfo(cli2->tree, mem_ctx, &finfo2);
@@ -598,7 +598,7 @@ static BOOL test_finfo_after_write(struct smbcli_state *cli, TALLOC_CTX *mem_ctx
/* This call is only for the people looking at ethereal :-) */
finfo2.basic_info.level = RAW_FILEINFO_BASIC_INFO;
- finfo2.basic_info.in.fname = fname;
+ finfo2.basic_info.file.path = fname;
status = smb_raw_pathinfo(cli->tree, mem_ctx, &finfo2);
diff --git a/source4/torture/basic/delete.c b/source4/torture/basic/delete.c
index 606e85a304..6aae6d073b 100644
--- a/source4/torture/basic/delete.c
+++ b/source4/torture/basic/delete.c
@@ -58,7 +58,7 @@ static BOOL check_delete_on_close(struct smbcli_state *cli, int fnum,
int nlink = expect_it ? 0 : 1;
io.all_info.level = RAW_FILEINFO_ALL_INFO;
- io.all_info.in.fnum = fnum;
+ io.all_info.file.fnum = fnum;
status = smb_raw_fileinfo(cli->tree, mem_ctx, &io);
if (!NT_STATUS_IS_OK(status)) {
@@ -83,7 +83,7 @@ static BOOL check_delete_on_close(struct smbcli_state *cli, int fnum,
}
io.standard_info.level = RAW_FILEINFO_STANDARD_INFO;
- io.standard_info.in.fnum = fnum;
+ io.standard_info.file.fnum = fnum;
status = smb_raw_fileinfo(cli->tree, mem_ctx, &io);
if (!NT_STATUS_IS_OK(status)) {
diff --git a/source4/torture/basic/denytest.c b/source4/torture/basic/denytest.c
index 2e68efa4eb..646714a4e9 100644
--- a/source4/torture/basic/denytest.c
+++ b/source4/torture/basic/denytest.c
@@ -1847,20 +1847,20 @@ static BOOL torture_ntdenytest(struct smbcli_state *cli1, struct smbcli_state *c
} else {
res = A_0;
if (smbcli_read(cli2->tree,
- io2.ntcreatex.out.fnum, buf, 0, sizeof(buf)) >= 1) {
+ io2.ntcreatex.file.fnum, buf, 0, sizeof(buf)) >= 1) {
res += A_R;
}
if (smbcli_write(cli2->tree,
- io2.ntcreatex.out.fnum, 0, buf, 0, sizeof(buf)) >= 1) {
+ io2.ntcreatex.file.fnum, 0, buf, 0, sizeof(buf)) >= 1) {
res += A_W;
}
}
if (NT_STATUS_IS_OK(status1)) {
- smbcli_close(cli1->tree, io1.ntcreatex.out.fnum);
+ smbcli_close(cli1->tree, io1.ntcreatex.file.fnum);
}
if (NT_STATUS_IS_OK(status2)) {
- smbcli_close(cli2->tree, io2.ntcreatex.out.fnum);
+ smbcli_close(cli2->tree, io2.ntcreatex.file.fnum);
}
status2_p = predict_share_conflict(io1.ntcreatex.in.share_access,
@@ -2000,11 +2000,11 @@ BOOL torture_denydos_sharing(void)
printf("openx twice with RDWR/DENY_DOS\n");
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum1 = io.openx.out.fnum;
+ fnum1 = io.openx.file.fnum;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum2 = io.openx.out.fnum;
+ fnum2 = io.openx.file.fnum;
printf("fnum1=%d fnum2=%d\n", fnum1, fnum2);
@@ -2016,12 +2016,12 @@ BOOL torture_denydos_sharing(void)
printf("two handles should be same file handle\n");
finfo.position_information.level = RAW_FILEINFO_POSITION_INFORMATION;
- finfo.position_information.in.fnum = fnum1;
+ finfo.position_information.file.fnum = fnum1;
status = smb_raw_fileinfo(cli->tree, mem_ctx, &finfo);
CHECK_STATUS(status, NT_STATUS_OK);
CHECK_VAL(finfo.position_information.out.position, 1000);
- finfo.position_information.in.fnum = fnum2;
+ finfo.position_information.file.fnum = fnum2;
status = smb_raw_fileinfo(cli->tree, mem_ctx, &finfo);
CHECK_STATUS(status, NT_STATUS_OK);
CHECK_VAL(finfo.position_information.out.position, 1000);
@@ -2034,12 +2034,12 @@ BOOL torture_denydos_sharing(void)
io.openx.in.open_mode = OPENX_MODE_ACCESS_RDWR | OPENX_MODE_DENY_NONE;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum1 = io.openx.out.fnum;
+ fnum1 = io.openx.file.fnum;
io.openx.in.open_func = OPENX_OPEN_FUNC_OPEN;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum2 = io.openx.out.fnum;
+ fnum2 = io.openx.file.fnum;
printf("fnum1=%d fnum2=%d\n", fnum1, fnum2);
@@ -2051,12 +2051,12 @@ BOOL torture_denydos_sharing(void)
CHECK_STATUS(status, NT_STATUS_OK);
finfo.position_information.level = RAW_FILEINFO_POSITION_INFORMATION;
- finfo.position_information.in.fnum = fnum1;
+ finfo.position_information.file.fnum = fnum1;
status = smb_raw_fileinfo(cli->tree, mem_ctx, &finfo);
CHECK_STATUS(status, NT_STATUS_OK);
CHECK_VAL(finfo.position_information.out.position, 1000);
- finfo.position_information.in.fnum = fnum2;
+ finfo.position_information.file.fnum = fnum2;
status = smb_raw_fileinfo(cli->tree, mem_ctx, &finfo);
CHECK_STATUS(status, NT_STATUS_OK);
CHECK_VAL(finfo.position_information.out.position, 0);
diff --git a/source4/torture/basic/disconnect.c b/source4/torture/basic/disconnect.c
index 61b1750b92..8ad11ccb6c 100644
--- a/source4/torture/basic/disconnect.c
+++ b/source4/torture/basic/disconnect.c
@@ -96,7 +96,7 @@ static BOOL test_disconnect_lock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
}
io.lockx.level = RAW_LOCK_LOCKX;
- io.lockx.in.fnum = fnum;
+ io.lockx.file.fnum = fnum;
io.lockx.in.mode = 0;
io.lockx.in.timeout = 0;
io.lockx.in.lock_cnt = 1;
diff --git a/source4/torture/gentest.c b/source4/torture/gentest.c
index 35cae68636..9a268c57b5 100644
--- a/source4/torture/gentest.c
+++ b/source4/torture/gentest.c
@@ -85,7 +85,7 @@ static struct {
static struct {
int notify_count;
NTSTATUS status;
- struct smb_notify notify;
+ union smb_notify notify;
} notifies[NSERVERS][NINSTANCES];
/* info relevant to the current operation */
@@ -681,7 +681,7 @@ static struct ea_struct gen_ea_struct(void)
*/
static void async_notify(struct smbcli_request *req)
{
- struct smb_notify notify;
+ union smb_notify notify;
NTSTATUS status;
int i, j;
uint16_t tid;
@@ -693,9 +693,9 @@ static void async_notify(struct smbcli_request *req)
if (NT_STATUS_IS_OK(status)) {
printf("notify tid=%d num_changes=%d action=%d name=%s\n",
tid,
- notify.out.num_changes,
- notify.out.changes[0].action,
- notify.out.changes[0].name.s);
+ notify.notify.out.num_changes,
+ notify.notify.out.changes[0].action,
+ notify.notify.out.changes[0].name.s);
}
for (i=0;i<NSERVERS;i++) {
@@ -762,7 +762,7 @@ static BOOL oplock_handler(struct smbcli_transport *transport, uint16_t tid, uin
printf("oplock close fnum=%d\n", fnum);
io.close.level = RAW_CLOSE_CLOSE;
- io.close.in.fnum = fnum;
+ io.close.file.fnum = fnum;
io.close.in.write_time = 0;
req = smb_raw_close_send(tree, &io);
@@ -893,7 +893,7 @@ again:
for (j=0;j<NINSTANCES;j++) {
for (i=1;i<NSERVERS;i++) {
int n;
- struct smb_notify not1, not2;
+ union smb_notify not1, not2;
if (notifies[0][j].notify_count != notifies[i][j].notify_count) {
if (tries++ < 10) goto again;
@@ -920,26 +920,26 @@ again:
not1 = notifies[0][j].notify;
not2 = notifies[i][j].notify;
- for (n=0;n<not1.out.num_changes;n++) {
- if (not1.out.changes[n].action !=
- not2.out.changes[n].action) {
+ for (n=0;n<not1.notify.out.num_changes;n++) {
+ if (not1.notify.out.changes[n].action !=
+ not2.notify.out.changes[n].action) {
printf("Notify action %d inconsistent %d %d\n", n,
- not1.out.changes[n].action,
- not2.out.changes[n].action);
+ not1.notify.out.changes[n].action,
+ not2.notify.out.changes[n].action);
return False;
}
- if (strcmp(not1.out.changes[n].name.s,
- not2.out.changes[n].name.s)) {
+ if (strcmp(not1.notify.out.changes[n].name.s,
+ not2.notify.out.changes[n].name.s)) {
printf("Notify name %d inconsistent %s %s\n", n,
- not1.out.changes[n].name.s,
- not2.out.changes[n].name.s);
+ not1.notify.out.changes[n].name.s,
+ not2.notify.out.changes[n].name.s);
return False;
}
- if (not1.out.changes[n].name.private_length !=
- not2.out.changes[n].name.private_length) {
+ if (not1.notify.out.changes[n].name.private_length !=
+ not2.notify.out.changes[n].name.private_length) {
printf("Notify name length %d inconsistent %d %d\n", n,
- not1.out.changes[n].name.private_length,
- not2.out.changes[n].name.private_length);
+ not1.notify.out.changes[n].name.private_length,
+ not2.notify.out.changes[n].name.private_length);
return False;
}
}
@@ -1095,7 +1095,7 @@ static BOOL handler_openx(int instance)
CHECK_TIMES_EQUAL(openx.out.write_time);
/* open creates a new file handle */
- ADD_HANDLE(parm[0].openx.in.fname, openx.out.fnum);
+ ADD_HANDLE(parm[0].openx.in.fname, openx.file.fnum);
return True;
}
@@ -1129,7 +1129,7 @@ static BOOL handler_open(int instance)
CHECK_EQUAL(openold.out.rmode);
/* open creates a new file handle */
- ADD_HANDLE(parm[0].openold.in.fname, openold.out.fnum);
+ ADD_HANDLE(parm[0].openold.in.fname, openold.file.fnum);
return True;
}
@@ -1182,7 +1182,7 @@ static BOOL handler_ntcreatex(int instance)
CHECK_EQUAL(ntcreatex.out.is_directory);
/* ntcreatex creates a new file handle */
- ADD_HANDLE(parm[0].ntcreatex.in.fname, ntcreatex.out.fnum);
+ ADD_HANDLE(parm[0].ntcreatex.in.fname, ntcreatex.file.fnum);
return True;
}
@@ -1196,14 +1196,14 @@ static BOOL handler_close(int instance)
NTSTATUS status[NSERVERS];
parm[0].close.level = RAW_CLOSE_CLOSE;
- parm[0].close.in.fnum = gen_fnum_close(instance);
+ parm[0].close.file.fnum = gen_fnum_close(instance);
parm[0].close.in.write_time = gen_timet();
GEN_COPY_PARM;
- GEN_SET_FNUM(close.in.fnum);
+ GEN_SET_FNUM(close.file.fnum);
GEN_CALL(smb_raw_close(tree, &parm[i]));
- REMOVE_HANDLE(close.in.fnum);
+ REMOVE_HANDLE(close.file.fnum);
return True;
}
@@ -1213,11 +1213,11 @@ static BOOL handler_close(int instance)
*/
static BOOL handler_unlink(int instance)
{
- struct smb_unlink parm[NSERVERS];
+ union smb_unlink parm[NSERVERS];
NTSTATUS status[NSERVERS];
- parm[0].in.pattern = gen_pattern();
- parm[0].in.attrib = gen_attrib();
+ parm[0].unlink.in.pattern = gen_pattern();
+ parm[0].unlink.in.attrib = gen_attrib();
GEN_COPY_PARM;
GEN_CALL(smb_raw_unlink(tree, &parm[i]));
@@ -1230,10 +1230,10 @@ static BOOL handler_unlink(int instance)
*/
static BOOL handler_chkpath(int instance)
{
- struct smb_chkpath parm[NSERVERS];
+ union smb_chkpath parm[NSERVERS];
NTSTATUS status[NSERVERS];
- parm[0].in.path = gen_fname_open(instance);
+ parm[0].chkpath.in.path = gen_fname_open(instance);
GEN_COPY_PARM;
GEN_CALL(smb_raw_chkpath(tree, &parm[i]));
@@ -1320,18 +1320,18 @@ static BOOL handler_ntrename(int instance)
*/
static BOOL handler_seek(int instance)
{
- struct smb_seek parm[NSERVERS];
+ union smb_seek parm[NSERVERS];
NTSTATUS status[NSERVERS];
- parm[0].in.fnum = gen_fnum(instance);
- parm[0].in.mode = gen_bits_mask2(0x3, 0xFFFF);
- parm[0].in.offset = gen_offset();
+ parm[0].lseek.file.fnum = gen_fnum(instance);
+ parm[0].lseek.in.mode = gen_bits_mask2(0x3, 0xFFFF);
+ parm[0].lseek.in.offset = gen_offset();
GEN_COPY_PARM;
- GEN_SET_FNUM(in.fnum);
+ GEN_SET_FNUM(lseek.file.fnum);
GEN_CALL(smb_raw_seek(tree, &parm[i]));
- CHECK_EQUAL(out.offset);
+ CHECK_EQUAL(lseek.out.offset);
return True;
}
@@ -1346,7 +1346,7 @@ static BOOL handler_readx(int instance)
NTSTATUS status[NSERVERS];
parm[0].readx.level = RAW_READ_READX;
- parm[0].readx.in.fnum = gen_fnum(instance);
+ parm[0].readx.file.fnum = gen_fnum(instance);
parm[0].readx.in.offset = gen_offset();
parm[0].readx.in.mincnt = gen_io_count();
parm[0].readx.in.maxcnt = gen_io_count();
@@ -1355,7 +1355,7 @@ static BOOL handler_readx(int instance)
MAX(parm[0].readx.in.mincnt, parm[0].readx.in.maxcnt));
GEN_COPY_PARM;
- GEN_SET_FNUM(readx.in.fnum);
+ GEN_SET_FNUM(readx.file.fnum);
GEN_CALL(smb_raw_read(tree, &parm[i]));
CHECK_EQUAL(readx.out.remaining);
@@ -1374,7 +1374,7 @@ static BOOL handler_writex(int instance)
NTSTATUS status[NSERVERS];
parm[0].writex.level = RAW_WRITE_WRITEX;
- parm[0].writex.in.fnum = gen_fnum(instance);
+ parm[0].writex.file.fnum = gen_fnum(instance);
parm[0].writex.in.offset = gen_offset();
parm[0].writex.in.wmode = gen_bits_mask(0xFFFF);
parm[0].writex.in.remaining = gen_io_count();
@@ -1382,7 +1382,7 @@ static BOOL handler_writex(int instance)
parm[0].writex.in.data = talloc_zero_size(current_op.mem_ctx, parm[0].writex.in.count);
GEN_COPY_PARM;
- GEN_SET_FNUM(writex.in.fnum);
+ GEN_SET_FNUM(writex.file.fnum);
GEN_CALL(smb_raw_write(tree, &parm[i]));
CHECK_EQUAL(writex.out.nwritten);
@@ -1401,7 +1401,7 @@ static BOOL handler_lockingx(int instance)
int n, nlocks;
parm[0].lockx.level = RAW_LOCK_LOCKX;
- parm[0].lockx.in.fnum = gen_fnum(instance);
+ parm[0].lockx.file.fnum = gen_fnum(instance);
parm[0].lockx.in.mode = gen_lock_mode();
parm[0].lockx.in.timeout = gen_timeout();
do {
@@ -1424,7 +1424,7 @@ static BOOL handler_lockingx(int instance)
}
GEN_COPY_PARM;
- GEN_SET_FNUM(lockx.in.fnum);
+ GEN_SET_FNUM(lockx.file.fnum);
GEN_CALL(smb_raw_lock(tree, &parm[i]));
return True;
@@ -1641,7 +1641,7 @@ static BOOL handler_qpathinfo(int instance)
union smb_fileinfo parm[NSERVERS];
NTSTATUS status[NSERVERS];
- parm[0].generic.in.fname = gen_fname_open(instance);
+ parm[0].generic.file.path = gen_fname_open(instance);
gen_fileinfo(instance, &parm[0]);
@@ -1659,12 +1659,12 @@ static BOOL handler_qfileinfo(int instance)
union smb_fileinfo parm[NSERVERS];
NTSTATUS status[NSERVERS];
- parm[0].generic.in.fnum = gen_fnum(instance);
+ parm[0].generic.file.fnum = gen_fnum(instance);
gen_fileinfo(instance, &parm[0]);
GEN_COPY_PARM;
- GEN_SET_FNUM(generic.in.fnum);
+ GEN_SET_FNUM(generic.file.fnum);
GEN_CALL(smb_raw_fileinfo(tree, current_op.mem_ctx, &parm[i]));
return cmp_fileinfo(instance, parm, status);
@@ -1777,7 +1777,7 @@ static BOOL handler_spathinfo(int instance)
union smb_setfileinfo parm[NSERVERS];
NTSTATUS status[NSERVERS];
- parm[0].generic.file.fname = gen_fname_open(instance);
+ parm[0].generic.file.path = gen_fname_open(instance);
gen_setfileinfo(instance, &parm[0]);
@@ -1820,16 +1820,16 @@ static BOOL handler_sfileinfo(int instance)
*/
static BOOL handler_notify(int instance)
{
- struct smb_notify parm[NSERVERS];
+ union smb_notify parm[NSERVERS];
int n;
- parm[0].in.buffer_size = gen_io_count();
- parm[0].in.completion_filter = gen_bits_mask(0xFF);
- parm[0].in.fnum = gen_fnum(instance);
- parm[0].in.recursive = gen_bool();
+ parm[0].notify.in.buffer_size = gen_io_count();
+ parm[0].notify.in.completion_filter = gen_bits_mask(0xFF);
+ parm[0].notify.file.fnum = gen_fnum(instance);
+ parm[0].notify.in.recursive = gen_bool();
GEN_COPY_PARM;
- GEN_SET_FNUM(in.fnum);
+ GEN_SET_FNUM(notify.file.fnum);
for (n=0;n<NSERVERS;n++) {
struct smbcli_request *req;
diff --git a/source4/torture/nbench/nbio.c b/source4/torture/nbench/nbio.c
index 863ddae83f..c5cebdc8d2 100644
--- a/source4/torture/nbench/nbio.c
+++ b/source4/torture/nbench/nbio.c
@@ -221,14 +221,14 @@ static void check_status(const char *op, NTSTATUS status, NTSTATUS ret)
void nb_unlink(const char *fname, int attr, NTSTATUS status)
{
- struct smb_unlink io;
+ union smb_unlink io;
NTSTATUS ret;
- io.in.pattern = fname;
+ io.unlink.in.pattern = fname;
- io.in.attrib = FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN;
+ io.unlink.in.attrib = FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN;
if (strchr(fname, '*') == 0) {
- io.in.attrib |= FILE_ATTRIBUTE_DIRECTORY;
+ io.unlink.in.attrib |= FILE_ATTRIBUTE_DIRECTORY;
}
ret = smb_raw_unlink(c->tree, &io);
@@ -286,7 +286,7 @@ void nb_createx(const char *fname,
f = malloc_p(struct ftable);
f->handle = handle;
- f->fd = io.ntcreatex.out.fnum;
+ f->fd = io.ntcreatex.file.fnum;
DLIST_ADD_END(ftable, f, struct ftable *);
}
@@ -306,7 +306,7 @@ void nb_writex(int handle, int offset, int size, int ret_size, NTSTATUS status)
memset(buf, 0xab, size);
io.writex.level = RAW_WRITE_WRITEX;
- io.writex.in.fnum = i;
+ io.writex.file.fnum = i;
io.writex.in.wmode = 0;
io.writex.in.remaining = 0;
io.writex.in.offset = offset;
@@ -344,7 +344,7 @@ void nb_write(int handle, int offset, int size, int ret_size, NTSTATUS status)
memset(buf, 0x12, size);
io.write.level = RAW_WRITE_WRITE;
- io.write.in.fnum = i;
+ io.write.file.fnum = i;
io.write.in.remaining = 0;
io.write.in.offset = offset;
io.write.in.count = size;
@@ -380,7 +380,7 @@ void nb_lockx(int handle, uint_t offset, int size, NTSTATUS status)
lck.count = size;
io.lockx.level = RAW_LOCK_LOCKX;
- io.lockx.in.fnum = i;
+ io.lockx.file.fnum = i;
io.lockx.in.mode = 0;
io.lockx.in.timeout = 0;
io.lockx.in.ulock_cnt = 0;
@@ -406,7 +406,7 @@ void nb_unlockx(int handle, uint_t offset, int size, NTSTATUS status)
lck.count = size;
io.lockx.level = RAW_LOCK_LOCKX;
- io.lockx.in.fnum = i;
+ io.lockx.file.fnum = i;
io.lockx.in.mode = 0;
io.lockx.in.timeout = 0;
io.lockx.in.ulock_cnt = 1;
@@ -432,7 +432,7 @@ void nb_readx(int handle, int offset, int size, int ret_size, NTSTATUS status)
buf = malloc(size);
io.readx.level = RAW_READ_READX;
- io.readx.in.fnum = i;
+ io.readx.file.fnum = i;
io.readx.in.offset = offset;
io.readx.in.mincnt = size;
io.readx.in.maxcnt = size;
@@ -464,7 +464,7 @@ void nb_close(int handle, NTSTATUS status)
i = find_handle(handle);
io.close.level = RAW_CLOSE_CLOSE;
- io.close.in.fnum = i;
+ io.close.file.fnum = i;
io.close.in.write_time = 0;
ret = smb_raw_close(c->tree, &io);
@@ -526,7 +526,7 @@ void nb_qpathinfo(const char *fname, int level, NTSTATUS status)
mem_ctx = talloc_init("nb_qpathinfo");
io.generic.level = level;
- io.generic.in.fname = fname;
+ io.generic.file.path = fname;
ret = smb_raw_pathinfo(c->tree, mem_ctx, &io);
@@ -548,7 +548,7 @@ void nb_qfileinfo(int fnum, int level, NTSTATUS status)
mem_ctx = talloc_init("nb_qfileinfo");
io.generic.level = level;
- io.generic.in.fnum = i;
+ io.generic.file.fnum = i;
ret = smb_raw_fileinfo(c->tree, mem_ctx, &io);
@@ -637,12 +637,12 @@ void nb_findfirst(const char *mask, int level, int maxcnt, int count, NTSTATUS s
void nb_flush(int fnum, NTSTATUS status)
{
- struct smb_flush io;
+ union smb_flush io;
NTSTATUS ret;
int i;
i = find_handle(fnum);
- io.in.fnum = i;
+ io.flush.file.fnum = i;
ret = smb_raw_flush(c->tree, &io);
diff --git a/source4/torture/raw/acls.c b/source4/torture/raw/acls.c
index 5abe9f23c4..74aefa4af5 100644
--- a/source4/torture/raw/acls.c
+++ b/source4/torture/raw/acls.c
@@ -69,11 +69,11 @@ static BOOL test_sd(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.ntcreatex.in.fname = fname;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.ntcreatex.out.fnum;
+ fnum = io.ntcreatex.file.fnum;
q.query_secdesc.level = RAW_FILEINFO_SEC_DESC;
- q.query_secdesc.in.fnum = fnum;
- q.query_secdesc.secinfo_flags =
+ q.query_secdesc.file.fnum = fnum;
+ q.query_secdesc.in.secinfo_flags =
SECINFO_OWNER |
SECINFO_GROUP |
SECINFO_DACL;
@@ -95,7 +95,7 @@ static BOOL test_sd(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
set.set_secdesc.level = RAW_SFILEINFO_SEC_DESC;
set.set_secdesc.file.fnum = fnum;
- set.set_secdesc.in.secinfo_flags = q.query_secdesc.secinfo_flags;
+ set.set_secdesc.in.secinfo_flags = q.query_secdesc.in.secinfo_flags;
set.set_secdesc.in.sd = sd;
status = smb_raw_setfileinfo(cli->tree, &set);
@@ -177,13 +177,13 @@ static BOOL test_nttrans_create(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.ntcreatex.out.fnum;
+ fnum = io.ntcreatex.file.fnum;
printf("querying ACL\n");
q.query_secdesc.level = RAW_FILEINFO_SEC_DESC;
- q.query_secdesc.in.fnum = fnum;
- q.query_secdesc.secinfo_flags =
+ q.query_secdesc.file.fnum = fnum;
+ q.query_secdesc.in.secinfo_flags =
SECINFO_OWNER |
SECINFO_GROUP |
SECINFO_DACL;
@@ -210,9 +210,9 @@ static BOOL test_nttrans_create(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.ntcreatex.in.sec_desc = sd;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.ntcreatex.out.fnum;
+ fnum = io.ntcreatex.file.fnum;
- q.query_secdesc.in.fnum = fnum;
+ q.query_secdesc.file.fnum = fnum;
status = smb_raw_fileinfo(cli->tree, mem_ctx, &q);
CHECK_STATUS(status, NT_STATUS_OK);
@@ -233,7 +233,7 @@ done:
#define CHECK_ACCESS_FLAGS(_fnum, flags) do { \
union smb_fileinfo _q; \
_q.access_information.level = RAW_FILEINFO_ACCESS_INFORMATION; \
- _q.access_information.in.fnum = (_fnum); \
+ _q.access_information.file.fnum = (_fnum); \
status = smb_raw_fileinfo(cli->tree, mem_ctx, &_q); \
CHECK_STATUS(status, NT_STATUS_OK); \
if (_q.access_information.out.access_flags != (flags)) { \
@@ -279,12 +279,12 @@ static BOOL test_creator_sid(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.ntcreatex.in.fname = fname;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.ntcreatex.out.fnum;
+ fnum = io.ntcreatex.file.fnum;
printf("get the original sd\n");
q.query_secdesc.level = RAW_FILEINFO_SEC_DESC;
- q.query_secdesc.in.fnum = fnum;
- q.query_secdesc.secinfo_flags = SECINFO_DACL | SECINFO_OWNER;
+ q.query_secdesc.file.fnum = fnum;
+ q.query_secdesc.in.secinfo_flags = SECINFO_DACL | SECINFO_OWNER;
status = smb_raw_fileinfo(cli->tree, mem_ctx, &q);
CHECK_STATUS(status, NT_STATUS_OK);
sd_orig = q.query_secdesc.out.sd;
@@ -365,10 +365,10 @@ static BOOL test_creator_sid(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.ntcreatex.in.access_mask = SEC_FILE_READ_DATA;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- CHECK_ACCESS_FLAGS(io.ntcreatex.out.fnum,
+ CHECK_ACCESS_FLAGS(io.ntcreatex.file.fnum,
SEC_FILE_READ_DATA|
SEC_FILE_READ_ATTRIBUTE);
- smbcli_close(cli->tree, io.ntcreatex.out.fnum);
+ smbcli_close(cli->tree, io.ntcreatex.file.fnum);
printf("try open for generic write\n");
io.ntcreatex.in.access_mask = SEC_GENERIC_WRITE;
@@ -379,9 +379,9 @@ static BOOL test_creator_sid(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.ntcreatex.in.access_mask = SEC_GENERIC_READ;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- CHECK_ACCESS_FLAGS(io.ntcreatex.out.fnum,
+ CHECK_ACCESS_FLAGS(io.ntcreatex.file.fnum,
SEC_RIGHTS_FILE_READ);
- smbcli_close(cli->tree, io.ntcreatex.out.fnum);
+ smbcli_close(cli->tree, io.ntcreatex.file.fnum);
printf("set a sec desc allowing generic read by owner\n");
sd = security_descriptor_create(mem_ctx,
@@ -426,10 +426,10 @@ static BOOL test_creator_sid(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.ntcreatex.in.access_mask = SEC_FILE_READ_DATA;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- CHECK_ACCESS_FLAGS(io.ntcreatex.out.fnum,
+ CHECK_ACCESS_FLAGS(io.ntcreatex.file.fnum,
SEC_FILE_READ_DATA |
SEC_FILE_READ_ATTRIBUTE);
- smbcli_close(cli->tree, io.ntcreatex.out.fnum);
+ smbcli_close(cli->tree, io.ntcreatex.file.fnum);
printf("try open for generic write\n");
io.ntcreatex.in.access_mask = SEC_GENERIC_WRITE;
@@ -440,8 +440,8 @@ static BOOL test_creator_sid(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.ntcreatex.in.access_mask = SEC_GENERIC_READ;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- CHECK_ACCESS_FLAGS(io.ntcreatex.out.fnum, SEC_RIGHTS_FILE_READ);
- smbcli_close(cli->tree, io.ntcreatex.out.fnum);
+ CHECK_ACCESS_FLAGS(io.ntcreatex.file.fnum, SEC_RIGHTS_FILE_READ);
+ smbcli_close(cli->tree, io.ntcreatex.file.fnum);
printf("put back original sd\n");
@@ -517,12 +517,12 @@ static BOOL test_generic_bits(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.ntcreatex.in.fname = fname;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.ntcreatex.out.fnum;
+ fnum = io.ntcreatex.file.fnum;
printf("get the original sd\n");
q.query_secdesc.level = RAW_FILEINFO_SEC_DESC;
- q.query_secdesc.in.fnum = fnum;
- q.query_secdesc.secinfo_flags = SECINFO_DACL | SECINFO_OWNER;
+ q.query_secdesc.file.fnum = fnum;
+ q.query_secdesc.in.secinfo_flags = SECINFO_DACL | SECINFO_OWNER;
status = smb_raw_fileinfo(cli->tree, mem_ctx, &q);
CHECK_STATUS(status, NT_STATUS_OK);
sd_orig = q.query_secdesc.out.sd;
@@ -599,9 +599,9 @@ static BOOL test_generic_bits(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.ntcreatex.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- CHECK_ACCESS_FLAGS(io.ntcreatex.out.fnum,
+ CHECK_ACCESS_FLAGS(io.ntcreatex.file.fnum,
expected_mask | file_mappings[i].specific_bits);
- smbcli_close(cli->tree, io.ntcreatex.out.fnum);
+ smbcli_close(cli->tree, io.ntcreatex.file.fnum);
if (!has_take_ownership_privilege) {
continue;
@@ -647,9 +647,9 @@ static BOOL test_generic_bits(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.ntcreatex.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- CHECK_ACCESS_FLAGS(io.ntcreatex.out.fnum,
+ CHECK_ACCESS_FLAGS(io.ntcreatex.file.fnum,
expected_mask_anon | file_mappings[i].specific_bits);
- smbcli_close(cli->tree, io.ntcreatex.out.fnum);
+ smbcli_close(cli->tree, io.ntcreatex.file.fnum);
}
printf("put back original sd\n");
@@ -679,12 +679,12 @@ static BOOL test_generic_bits(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.ntcreatex.in.fname = fname;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.ntcreatex.out.fnum;
+ fnum = io.ntcreatex.file.fnum;
printf("get the original sd\n");
q.query_secdesc.level = RAW_FILEINFO_SEC_DESC;
- q.query_secdesc.in.fnum = fnum;
- q.query_secdesc.secinfo_flags = SECINFO_DACL | SECINFO_OWNER;
+ q.query_secdesc.file.fnum = fnum;
+ q.query_secdesc.in.secinfo_flags = SECINFO_DACL | SECINFO_OWNER;
status = smb_raw_fileinfo(cli->tree, mem_ctx, &q);
CHECK_STATUS(status, NT_STATUS_OK);
sd_orig = q.query_secdesc.out.sd;
@@ -739,9 +739,9 @@ static BOOL test_generic_bits(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.ntcreatex.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- CHECK_ACCESS_FLAGS(io.ntcreatex.out.fnum,
+ CHECK_ACCESS_FLAGS(io.ntcreatex.file.fnum,
expected_mask | dir_mappings[i].specific_bits);
- smbcli_close(cli->tree, io.ntcreatex.out.fnum);
+ smbcli_close(cli->tree, io.ntcreatex.file.fnum);
}
printf("put back original sd\n");
@@ -797,12 +797,12 @@ static BOOL test_owner_bits(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.ntcreatex.in.fname = fname;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.ntcreatex.out.fnum;
+ fnum = io.ntcreatex.file.fnum;
printf("get the original sd\n");
q.query_secdesc.level = RAW_FILEINFO_SEC_DESC;
- q.query_secdesc.in.fnum = fnum;
- q.query_secdesc.secinfo_flags = SECINFO_DACL | SECINFO_OWNER;
+ q.query_secdesc.file.fnum = fnum;
+ q.query_secdesc.in.secinfo_flags = SECINFO_DACL | SECINFO_OWNER;
status = smb_raw_fileinfo(cli->tree, mem_ctx, &q);
CHECK_STATUS(status, NT_STATUS_OK);
sd_orig = q.query_secdesc.out.sd;
@@ -855,8 +855,8 @@ static BOOL test_owner_bits(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
bit, expected_bits);
}
CHECK_STATUS(status, NT_STATUS_OK);
- CHECK_ACCESS_FLAGS(io.ntcreatex.out.fnum, bit | SEC_FILE_READ_ATTRIBUTE);
- smbcli_close(cli->tree, io.ntcreatex.out.fnum);
+ CHECK_ACCESS_FLAGS(io.ntcreatex.file.fnum, bit | SEC_FILE_READ_ATTRIBUTE);
+ smbcli_close(cli->tree, io.ntcreatex.file.fnum);
} else {
CHECK_STATUS(status, NT_STATUS_ACCESS_DENIED);
}
@@ -1019,12 +1019,12 @@ static BOOL test_inheritance(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.ntcreatex.out.fnum;
+ fnum = io.ntcreatex.file.fnum;
printf("get the original sd\n");
q.query_secdesc.level = RAW_FILEINFO_SEC_DESC;
- q.query_secdesc.in.fnum = fnum;
- q.query_secdesc.secinfo_flags = SECINFO_DACL | SECINFO_OWNER;
+ q.query_secdesc.file.fnum = fnum;
+ q.query_secdesc.in.secinfo_flags = SECINFO_DACL | SECINFO_OWNER;
status = smb_raw_fileinfo(cli->tree, mem_ctx, &q);
CHECK_STATUS(status, NT_STATUS_OK);
sd_orig = q.query_secdesc.out.sd;
@@ -1070,9 +1070,9 @@ static BOOL test_inheritance(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.ntcreatex.in.create_options = 0;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum2 = io.ntcreatex.out.fnum;
+ fnum2 = io.ntcreatex.file.fnum;
- q.query_secdesc.in.fnum = fnum2;
+ q.query_secdesc.file.fnum = fnum2;
status = smb_raw_fileinfo(cli->tree, mem_ctx, &q);
CHECK_STATUS(status, NT_STATUS_OK);
@@ -1113,9 +1113,9 @@ static BOOL test_inheritance(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.ntcreatex.in.create_options = NTCREATEX_OPTIONS_DIRECTORY;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum2 = io.ntcreatex.out.fnum;
+ fnum2 = io.ntcreatex.file.fnum;
- q.query_secdesc.in.fnum = fnum2;
+ q.query_secdesc.file.fnum = fnum2;
status = smb_raw_fileinfo(cli->tree, mem_ctx, &q);
CHECK_STATUS(status, NT_STATUS_OK);
@@ -1205,11 +1205,11 @@ static BOOL test_inheritance(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.ntcreatex.in.open_disposition = NTCREATEX_DISP_CREATE;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum2 = io.ntcreatex.out.fnum;
+ fnum2 = io.ntcreatex.file.fnum;
CHECK_ACCESS_FLAGS(fnum2, SEC_RIGHTS_FILE_ALL);
- q.query_secdesc.in.fnum = fnum2;
- q.query_secdesc.secinfo_flags = SECINFO_DACL | SECINFO_OWNER;
+ q.query_secdesc.file.fnum = fnum2;
+ q.query_secdesc.in.secinfo_flags = SECINFO_DACL | SECINFO_OWNER;
status = smb_raw_fileinfo(cli->tree, mem_ctx, &q);
CHECK_STATUS(status, NT_STATUS_OK);
smbcli_close(cli->tree, fnum2);
@@ -1220,7 +1220,7 @@ static BOOL test_inheritance(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
if (NT_STATUS_IS_OK(status)) {
printf("failed: w2k3 ACL bug (allowed open when ACL should deny)\n");
ret = False;
- fnum2 = io.ntcreatex.out.fnum;
+ fnum2 = io.ntcreatex.file.fnum;
smbcli_close(cli->tree, fnum2);
} else {
CHECK_STATUS(status, NT_STATUS_ACCESS_DENIED);
@@ -1241,7 +1241,7 @@ static BOOL test_inheritance(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.ntcreatex.in.access_mask = SEC_FILE_WRITE_DATA;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum2 = io.ntcreatex.out.fnum;
+ fnum2 = io.ntcreatex.file.fnum;
CHECK_ACCESS_FLAGS(fnum2, SEC_FILE_WRITE_DATA | SEC_FILE_READ_ATTRIBUTE);
smbcli_close(cli->tree, fnum2);
@@ -1262,7 +1262,7 @@ static BOOL test_inheritance(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.ntcreatex.in.access_mask = SEC_FILE_WRITE_DATA;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum2 = io.ntcreatex.out.fnum;
+ fnum2 = io.ntcreatex.file.fnum;
CHECK_ACCESS_FLAGS(fnum2, SEC_FILE_WRITE_DATA | SEC_FILE_READ_ATTRIBUTE);
smbcli_close(cli->tree, fnum2);
@@ -1318,12 +1318,12 @@ static BOOL test_inheritance_dynamic(struct smbcli_state *cli, TALLOC_CTX *mem_c
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.ntcreatex.out.fnum;
+ fnum = io.ntcreatex.file.fnum;
printf("get the original sd\n");
q.query_secdesc.level = RAW_FILEINFO_SEC_DESC;
- q.query_secdesc.in.fnum = fnum;
- q.query_secdesc.secinfo_flags = SECINFO_DACL | SECINFO_OWNER;
+ q.query_secdesc.file.fnum = fnum;
+ q.query_secdesc.in.secinfo_flags = SECINFO_DACL | SECINFO_OWNER;
status = smb_raw_fileinfo(cli->tree, mem_ctx, &q);
CHECK_STATUS(status, NT_STATUS_OK);
sd_orig = q.query_secdesc.out.sd;
@@ -1355,7 +1355,7 @@ static BOOL test_inheritance_dynamic(struct smbcli_state *cli, TALLOC_CTX *mem_c
io.ntcreatex.in.open_disposition = NTCREATEX_DISP_CREATE;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum2 = io.ntcreatex.out.fnum;
+ fnum2 = io.ntcreatex.file.fnum;
smbcli_close(cli->tree, fnum2);
printf("try and access file with base rights - should be OK\n");
@@ -1363,7 +1363,7 @@ static BOOL test_inheritance_dynamic(struct smbcli_state *cli, TALLOC_CTX *mem_c
io.ntcreatex.in.open_disposition = NTCREATEX_DISP_OPEN;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum2 = io.ntcreatex.out.fnum;
+ fnum2 = io.ntcreatex.file.fnum;
smbcli_close(cli->tree, fnum2);
printf("try and access file with extra rights - should be denied\n");
@@ -1389,7 +1389,7 @@ static BOOL test_inheritance_dynamic(struct smbcli_state *cli, TALLOC_CTX *mem_c
io.ntcreatex.in.access_mask = SEC_FILE_WRITE_DATA;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum2 = io.ntcreatex.out.fnum;
+ fnum2 = io.ntcreatex.file.fnum;
smbcli_close(cli->tree, fnum2);
diff --git a/source4/torture/raw/chkpath.c b/source4/torture/raw/chkpath.c
index 4b19372b10..7ce5422cfe 100644
--- a/source4/torture/raw/chkpath.c
+++ b/source4/torture/raw/chkpath.c
@@ -55,9 +55,9 @@ static NTSTATUS single_search(struct smbcli_state *cli,
static BOOL test_path(struct smbcli_state *cli, const char *path, NTSTATUS expected, NTSTATUS dos_expected)
{
- struct smb_chkpath io;
+ union smb_chkpath io;
NTSTATUS status;
- io.in.path = path;
+ io.chkpath.in.path = path;
status = smb_raw_chkpath(cli->tree, &io);
if (!NT_STATUS_EQUAL(status, expected) && !NT_STATUS_EQUAL(status, dos_expected)) {
printf("%-40s FAILED %s should be %s or %s\n",
@@ -72,13 +72,13 @@ static BOOL test_path(struct smbcli_state *cli, const char *path, NTSTATUS expec
static BOOL test_chkpath(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
{
- struct smb_chkpath io;
+ union smb_chkpath io;
NTSTATUS status;
BOOL ret = True;
int fnum = -1;
int fnum1 = -1;
- io.in.path = BASEDIR;
+ io.chkpath.in.path = BASEDIR;
status = smb_raw_chkpath(cli->tree, &io);
CHECK_STATUS(status, NT_STATUS_OK, NT_STATUS_OK);
diff --git a/source4/torture/raw/close.c b/source4/torture/raw/close.c
index e19fe0f3cb..8a82a46acc 100644
--- a/source4/torture/raw/close.c
+++ b/source4/torture/raw/close.c
@@ -33,7 +33,7 @@ BOOL torture_raw_close(void)
BOOL ret = True;
TALLOC_CTX *mem_ctx;
union smb_close io;
- struct smb_flush io_flush;
+ union smb_flush io_flush;
int fnum;
const char *fname = "\\torture_close.txt";
time_t basetime = (time(NULL) + 3*86400) & ~1;
@@ -65,7 +65,7 @@ BOOL torture_raw_close(void)
REOPEN;
io.close.level = RAW_CLOSE_CLOSE;
- io.close.in.fnum = fnum;
+ io.close.file.fnum = fnum;
io.close.in.write_time = basetime;
status = smb_raw_close(cli->tree, &io);
CHECK_STATUS(status, NT_STATUS_OK);
@@ -76,8 +76,8 @@ BOOL torture_raw_close(void)
printf("testing close.in.write_time\n");
/* the file should have the write time set */
- finfo.generic.in.fname = fname;
finfo.generic.level = RAW_FILEINFO_ALL_INFO;
+ finfo.generic.file.path = fname;
status = smb_raw_pathinfo(cli->tree, mem_ctx, &finfo);
CHECK_STATUS(status, NT_STATUS_OK);
@@ -107,20 +107,20 @@ BOOL torture_raw_close(void)
smbcli_unlink(cli->tree, fname);
REOPEN;
- finfo2.generic.in.fname = fname;
finfo2.generic.level = RAW_FILEINFO_ALL_INFO;
+ finfo2.generic.file.path = fname;
status = smb_raw_pathinfo(cli->tree, mem_ctx, &finfo2);
CHECK_STATUS(status, NT_STATUS_OK);
io.close.level = RAW_CLOSE_CLOSE;
- io.close.in.fnum = fnum;
+ io.close.file.fnum = fnum;
io.close.in.write_time = 0;
status = smb_raw_close(cli->tree, &io);
CHECK_STATUS(status, NT_STATUS_OK);
/* the file should have the write time set equal to access time */
- finfo.generic.in.fname = fname;
finfo.generic.level = RAW_FILEINFO_ALL_INFO;
+ finfo.generic.file.path = fname;
status = smb_raw_pathinfo(cli->tree, mem_ctx, &finfo);
CHECK_STATUS(status, NT_STATUS_OK);
@@ -136,31 +136,31 @@ BOOL torture_raw_close(void)
/* check splclose on a file */
REOPEN;
io.splclose.level = RAW_CLOSE_SPLCLOSE;
- io.splclose.in.fnum = fnum;
+ io.splclose.file.fnum = fnum;
status = smb_raw_close(cli->tree, &io);
CHECK_STATUS(status, NT_STATUS_DOS(ERRSRV, ERRerror));
printf("testing flush\n");
smbcli_close(cli->tree, fnum);
- io_flush.in.fnum = fnum;
+ io_flush.flush.file.fnum = fnum;
status = smb_raw_flush(cli->tree, &io_flush);
CHECK_STATUS(status, NT_STATUS_INVALID_HANDLE);
- io_flush.in.fnum = 0xffff;
+ io_flush.flush.file.fnum = 0xffff;
status = smb_raw_flush(cli->tree, &io_flush);
CHECK_STATUS(status, NT_STATUS_OK);
REOPEN;
- io_flush.in.fnum = fnum;
+ io_flush.flush.file.fnum = fnum;
status = smb_raw_flush(cli->tree, &io_flush);
CHECK_STATUS(status, NT_STATUS_OK);
printf("Testing SMBexit\n");
smb_raw_exit(cli->session);
- io_flush.in.fnum = fnum;
+ io_flush.flush.file.fnum = fnum;
status = smb_raw_flush(cli->tree, &io_flush);
CHECK_STATUS(status, NT_STATUS_INVALID_HANDLE);
diff --git a/source4/torture/raw/context.c b/source4/torture/raw/context.c
index 43e059e23d..ebd3a3857f 100644
--- a/source4/torture/raw/context.c
+++ b/source4/torture/raw/context.c
@@ -179,11 +179,11 @@ static BOOL test_session(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.ntcreatex.in.fname = fname;
status = smb_raw_open(tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.ntcreatex.out.fnum;
+ fnum = io.ntcreatex.file.fnum;
printf("write using the old vuid\n");
wr.generic.level = RAW_WRITE_WRITEX;
- wr.writex.in.fnum = fnum;
+ wr.writex.file.fnum = fnum;
wr.writex.in.offset = 0;
wr.writex.in.wmode = 0;
wr.writex.in.remaining = 0;
@@ -213,7 +213,7 @@ static BOOL test_session(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
printf("the fnum should have been auto-closed\n");
cl.close.level = RAW_CLOSE_CLOSE;
- cl.close.in.fnum = fnum;
+ cl.close.file.fnum = fnum;
cl.close.in.write_time = 0;
status = smb_raw_close(cli->tree, &cl);
CHECK_STATUS(status, NT_STATUS_INVALID_HANDLE);
@@ -319,11 +319,11 @@ static BOOL test_tree(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.ntcreatex.in.fname = fname;
status = smb_raw_open(tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.ntcreatex.out.fnum;
+ fnum = io.ntcreatex.file.fnum;
printf("write using the old tid\n");
wr.generic.level = RAW_WRITE_WRITEX;
- wr.writex.in.fnum = fnum;
+ wr.writex.file.fnum = fnum;
wr.writex.in.offset = 0;
wr.writex.in.wmode = 0;
wr.writex.in.remaining = 0;
@@ -348,7 +348,7 @@ static BOOL test_tree(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
printf("the fnum should have been auto-closed\n");
cl.close.level = RAW_CLOSE_CLOSE;
- cl.close.in.fnum = fnum;
+ cl.close.file.fnum = fnum;
cl.close.in.write_time = 0;
status = smb_raw_close(cli->tree, &cl);
CHECK_STATUS(status, NT_STATUS_INVALID_HANDLE);
@@ -404,12 +404,12 @@ static BOOL test_pid(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.ntcreatex.in.fname = fname;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.ntcreatex.out.fnum;
+ fnum = io.ntcreatex.file.fnum;
printf("write using the old pid\n");
cli->session->pid = pid1;
wr.generic.level = RAW_WRITE_WRITEX;
- wr.writex.in.fnum = fnum;
+ wr.writex.file.fnum = fnum;
wr.writex.in.offset = 0;
wr.writex.in.wmode = 0;
wr.writex.in.remaining = 0;
@@ -449,7 +449,7 @@ static BOOL test_pid(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
printf("the fnum should have been auto-closed\n");
cl.close.level = RAW_CLOSE_CLOSE;
- cl.close.in.fnum = fnum;
+ cl.close.file.fnum = fnum;
cl.close.in.write_time = 0;
status = smb_raw_close(cli->tree, &cl);
CHECK_STATUS(status, NT_STATUS_INVALID_HANDLE);
diff --git a/source4/torture/raw/eas.c b/source4/torture/raw/eas.c
index 3bc954d572..8ef489a736 100644
--- a/source4/torture/raw/eas.c
+++ b/source4/torture/raw/eas.c
@@ -72,7 +72,7 @@ static BOOL test_eas(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.ntcreatex.in.fname = fname;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.ntcreatex.out.fnum;
+ fnum = io.ntcreatex.file.fnum;
ret &= check_ea(cli, fname, "EAONE", NULL);
@@ -297,7 +297,7 @@ static BOOL test_max_eas(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.ntcreatex.in.fname = fname;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.ntcreatex.out.fnum;
+ fnum = io.ntcreatex.file.fnum;
eablob = data_blob_talloc(mem_ctx, NULL, maxeasize);
if (eablob.data == NULL) {
@@ -409,7 +409,7 @@ static BOOL test_nttrans_create(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.ntcreatex.out.fnum;
+ fnum = io.ntcreatex.file.fnum;
ret &= check_ea(cli, fname, "EAONE", NULL);
ret &= check_ea(cli, fname, "1st EA", "Value One");
@@ -429,7 +429,7 @@ static BOOL test_nttrans_create(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.ntcreatex.out.fnum;
+ fnum = io.ntcreatex.file.fnum;
ret &= check_ea(cli, fname, "1st EA", "Value One");
ret &= check_ea(cli, fname, "2nd EA", "Second Value");
diff --git a/source4/torture/raw/ioctl.c b/source4/torture/raw/ioctl.c
index 2c51e4d7b4..c0df9b77f0 100644
--- a/source4/torture/raw/ioctl.c
+++ b/source4/torture/raw/ioctl.c
@@ -56,7 +56,7 @@ static BOOL test_ioctl(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
printf("Trying 0xFFFF\n");
ctl.ioctl.level = RAW_IOCTL_IOCTL;
- ctl.ioctl.in.fnum = fnum;
+ ctl.ioctl.file.fnum = fnum;
ctl.ioctl.in.request = 0xFFFF;
status = smb_raw_ioctl(cli->tree, mem_ctx, &ctl);
@@ -64,14 +64,14 @@ static BOOL test_ioctl(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
printf("Trying QUERY_JOB_INFO\n");
ctl.ioctl.level = RAW_IOCTL_IOCTL;
- ctl.ioctl.in.fnum = fnum;
+ ctl.ioctl.file.fnum = fnum;
ctl.ioctl.in.request = IOCTL_QUERY_JOB_INFO;
status = smb_raw_ioctl(cli->tree, mem_ctx, &ctl);
CHECK_STATUS(status, NT_STATUS_DOS(ERRSRV, ERRerror));
printf("Trying bad handle\n");
- ctl.ioctl.in.fnum = fnum+1;
+ ctl.ioctl.file.fnum = fnum+1;
status = smb_raw_ioctl(cli->tree, mem_ctx, &ctl);
CHECK_STATUS(status, NT_STATUS_DOS(ERRSRV, ERRerror));
@@ -101,7 +101,7 @@ static BOOL test_fsctl(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
printf("trying sparse file\n");
nt.ioctl.level = RAW_IOCTL_NTIOCTL;
nt.ntioctl.in.function = FSCTL_SET_SPARSE;
- nt.ntioctl.in.fnum = fnum;
+ nt.ntioctl.file.fnum = fnum;
nt.ntioctl.in.fsctl = True;
nt.ntioctl.in.filter = 0;
@@ -111,7 +111,7 @@ static BOOL test_fsctl(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
printf("trying batch oplock\n");
nt.ioctl.level = RAW_IOCTL_NTIOCTL;
nt.ntioctl.in.function = (FSCTL_FILESYSTEM | (2<<2));
- nt.ntioctl.in.fnum = fnum;
+ nt.ntioctl.file.fnum = fnum;
nt.ntioctl.in.fsctl = True;
nt.ntioctl.in.filter = 0;
@@ -123,12 +123,12 @@ static BOOL test_fsctl(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
}
printf("Trying bad handle\n");
- nt.ntioctl.in.fnum = fnum+1;
+ nt.ntioctl.file.fnum = fnum+1;
status = smb_raw_ioctl(cli->tree, mem_ctx, &nt);
CHECK_STATUS(status, NT_STATUS_INVALID_HANDLE);
#if 0
- nt.ntioctl.in.fnum = fnum;
+ nt.ntioctl.file.fnum = fnum;
for (i=0;i<100;i++) {
nt.ntioctl.in.function = FSCTL_FILESYSTEM + (i<<2);
status = smb_raw_ioctl(cli->tree, mem_ctx, &nt);
diff --git a/source4/torture/raw/lock.c b/source4/torture/raw/lock.c
index f18df47528..bccb17d714 100644
--- a/source4/torture/raw/lock.c
+++ b/source4/torture/raw/lock.c
@@ -71,7 +71,7 @@ static BOOL test_lock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
printf("Trying 0/0 lock\n");
io.lock.level = RAW_LOCK_LOCK;
- io.lock.in.fnum = fnum;
+ io.lock.file.fnum = fnum;
io.lock.in.count = 0;
io.lock.in.offset = 0;
status = smb_raw_lock(cli->tree, &io);
@@ -86,7 +86,7 @@ static BOOL test_lock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
printf("Trying 0/1 lock\n");
io.lock.level = RAW_LOCK_LOCK;
- io.lock.in.fnum = fnum;
+ io.lock.file.fnum = fnum;
io.lock.in.count = 1;
io.lock.in.offset = 0;
status = smb_raw_lock(cli->tree, &io);
@@ -104,7 +104,7 @@ static BOOL test_lock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
printf("Trying 0xEEFFFFFF lock\n");
io.lock.level = RAW_LOCK_LOCK;
- io.lock.in.fnum = fnum;
+ io.lock.file.fnum = fnum;
io.lock.in.count = 4000;
io.lock.in.offset = 0xEEFFFFFF;
status = smb_raw_lock(cli->tree, &io);
@@ -122,7 +122,7 @@ static BOOL test_lock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
printf("Trying 0xEF000000 lock\n");
io.lock.level = RAW_LOCK_LOCK;
- io.lock.in.fnum = fnum;
+ io.lock.file.fnum = fnum;
io.lock.in.count = 4000;
io.lock.in.offset = 0xEEFFFFFF;
status = smb_raw_lock(cli->tree, &io);
@@ -140,7 +140,7 @@ static BOOL test_lock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
printf("Trying max lock\n");
io.lock.level = RAW_LOCK_LOCK;
- io.lock.in.fnum = fnum;
+ io.lock.file.fnum = fnum;
io.lock.in.count = 4000;
io.lock.in.offset = 0xEF000000;
status = smb_raw_lock(cli->tree, &io);
@@ -158,7 +158,7 @@ static BOOL test_lock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
printf("Trying wrong pid unlock\n");
io.lock.level = RAW_LOCK_LOCK;
- io.lock.in.fnum = fnum;
+ io.lock.file.fnum = fnum;
io.lock.in.count = 4002;
io.lock.in.offset = 10001;
status = smb_raw_lock(cli->tree, &io);
@@ -206,7 +206,7 @@ static BOOL test_lockx(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
}
io.lockx.level = RAW_LOCK_LOCKX;
- io.lockx.in.fnum = fnum;
+ io.lockx.file.fnum = fnum;
io.lockx.in.mode = LOCKING_ANDX_LARGE_FILES;
io.lockx.in.timeout = 0;
io.lockx.in.ulock_cnt = 0;
@@ -394,7 +394,7 @@ static BOOL test_pidhigh(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
}
io.lockx.level = RAW_LOCK_LOCKX;
- io.lockx.in.fnum = fnum;
+ io.lockx.file.fnum = fnum;
io.lockx.in.mode = LOCKING_ANDX_LARGE_FILES;
io.lockx.in.timeout = 0;
io.lockx.in.ulock_cnt = 0;
@@ -468,7 +468,7 @@ static BOOL test_async(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
}
io.lockx.level = RAW_LOCK_LOCKX;
- io.lockx.in.fnum = fnum;
+ io.lockx.file.fnum = fnum;
io.lockx.in.mode = LOCKING_ANDX_LARGE_FILES;
io.lockx.in.timeout = 0;
io.lockx.in.ulock_cnt = 0;
@@ -621,7 +621,7 @@ static BOOL test_changetype(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
}
io.lockx.level = RAW_LOCK_LOCKX;
- io.lockx.in.fnum = fnum;
+ io.lockx.file.fnum = fnum;
io.lockx.in.mode = LOCKING_ANDX_SHARED_LOCK;
io.lockx.in.timeout = 0;
io.lockx.in.ulock_cnt = 0;
diff --git a/source4/torture/raw/mux.c b/source4/torture/raw/mux.c
index 97a1bf3cc4..6cf3634f11 100644
--- a/source4/torture/raw/mux.c
+++ b/source4/torture/raw/mux.c
@@ -65,13 +65,13 @@ static BOOL test_mux_open(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.ntcreatex.in.fname = BASEDIR "\\open.dat";
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum1 = io.ntcreatex.out.fnum;
+ fnum1 = io.ntcreatex.file.fnum;
printf("send 2nd open, non-conflicting\n");
io.ntcreatex.in.open_disposition = NTCREATEX_DISP_OPEN;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum2 = io.ntcreatex.out.fnum;
+ fnum2 = io.ntcreatex.file.fnum;
tv = timeval_current();
@@ -131,7 +131,7 @@ static BOOL test_mux_open(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
}
printf("close the 1st async open\n");
- smbcli_close(cli->tree, io.ntcreatex.out.fnum);
+ smbcli_close(cli->tree, io.ntcreatex.file.fnum);
done:
return ret;
@@ -171,7 +171,7 @@ static BOOL test_mux_write(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
/* send an async write */
io.generic.level = RAW_WRITE_WRITEX;
- io.writex.in.fnum = fnum;
+ io.writex.file.fnum = fnum;
io.writex.in.offset = 0;
io.writex.in.wmode = 0;
io.writex.in.remaining = 0;
@@ -217,7 +217,7 @@ static BOOL test_mux_lock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
printf("establishing a lock\n");
io.lockx.level = RAW_LOCK_LOCKX;
- io.lockx.in.fnum = fnum;
+ io.lockx.file.fnum = fnum;
io.lockx.in.mode = 0;
io.lockx.in.timeout = 0;
io.lockx.in.lock_cnt = 1;
@@ -258,7 +258,7 @@ static BOOL test_mux_lock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
printf("Now trying with a cancel\n");
io.lockx.level = RAW_LOCK_LOCKX;
- io.lockx.in.fnum = fnum;
+ io.lockx.file.fnum = fnum;
io.lockx.in.mode = 0;
io.lockx.in.timeout = 0;
io.lockx.in.lock_cnt = 1;
diff --git a/source4/torture/raw/notify.c b/source4/torture/raw/notify.c
index 7e96beb646..766c5374a9 100644
--- a/source4/torture/raw/notify.c
+++ b/source4/torture/raw/notify.c
@@ -60,7 +60,7 @@ BOOL torture_raw_notify(void)
BOOL ret = True;
TALLOC_CTX *mem_ctx;
NTSTATUS status;
- struct smb_notify notify;
+ union smb_notify notify;
union smb_open io;
int i, count, fnum, fnum2;
struct smbcli_request *req, *req2;
@@ -94,17 +94,17 @@ BOOL torture_raw_notify(void)
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.ntcreatex.out.fnum;
+ fnum = io.ntcreatex.file.fnum;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum2 = io.ntcreatex.out.fnum;
+ fnum2 = io.ntcreatex.file.fnum;
/* ask for a change notify */
- notify.in.buffer_size = 1000;
- notify.in.completion_filter = 0x3;
- notify.in.fnum = fnum;
- notify.in.recursive = True;
+ notify.notify.in.buffer_size = 1000;
+ notify.notify.in.completion_filter = 0x3;
+ notify.notify.file.fnum = fnum;
+ notify.notify.in.recursive = True;
printf("testing notify mkdir\n");
@@ -114,9 +114,9 @@ BOOL torture_raw_notify(void)
status = smb_raw_changenotify_recv(req, mem_ctx, &notify);
CHECK_STATUS(status, NT_STATUS_OK);
- CHECK_VAL(notify.out.num_changes, 1);
- CHECK_VAL(notify.out.changes[0].action, NOTIFY_ACTION_ADDED);
- CHECK_WSTR(notify.out.changes[0].name, "subdir-name", STR_UNICODE);
+ CHECK_VAL(notify.notify.out.num_changes, 1);
+ CHECK_VAL(notify.notify.out.changes[0].action, NOTIFY_ACTION_ADDED);
+ CHECK_WSTR(notify.notify.out.changes[0].name, "subdir-name", STR_UNICODE);
printf("testing notify rmdir\n");
@@ -125,9 +125,9 @@ BOOL torture_raw_notify(void)
status = smb_raw_changenotify_recv(req, mem_ctx, &notify);
CHECK_STATUS(status, NT_STATUS_OK);
- CHECK_VAL(notify.out.num_changes, 1);
- CHECK_VAL(notify.out.changes[0].action, NOTIFY_ACTION_REMOVED);
- CHECK_WSTR(notify.out.changes[0].name, "subdir-name", STR_UNICODE);
+ CHECK_VAL(notify.notify.out.num_changes, 1);
+ CHECK_VAL(notify.notify.out.changes[0].action, NOTIFY_ACTION_REMOVED);
+ CHECK_WSTR(notify.notify.out.changes[0].name, "subdir-name", STR_UNICODE);
printf("testing notify cancel\n");
@@ -154,12 +154,12 @@ BOOL torture_raw_notify(void)
/* setup a new notify on a different directory handle. This
new notify won't see the events above. */
- notify.in.fnum = fnum2;
+ notify.notify.file.fnum = fnum2;
req2 = smb_raw_changenotify_send(cli->tree, &notify);
/* whereas this notify will see the above buffered events as
well */
- notify.in.fnum = fnum;
+ notify.notify.file.fnum = fnum;
req = smb_raw_changenotify_send(cli->tree, &notify);
status = smbcli_unlink(cli->tree, BASEDIR "\\test0.txt");
@@ -169,16 +169,16 @@ BOOL torture_raw_notify(void)
status = smb_raw_changenotify_recv(req, mem_ctx, &notify);
CHECK_STATUS(status, NT_STATUS_OK);
- CHECK_VAL(notify.out.num_changes, count+1);
- for (i=0;i<notify.out.num_changes;i++) {
- CHECK_VAL(notify.out.changes[i].action, NOTIFY_ACTION_ADDED);
+ CHECK_VAL(notify.notify.out.num_changes, count+1);
+ for (i=0;i<notify.notify.out.num_changes;i++) {
+ CHECK_VAL(notify.notify.out.changes[i].action, NOTIFY_ACTION_ADDED);
}
- CHECK_WSTR(notify.out.changes[0].name, "subdir-name", STR_UNICODE);
+ CHECK_WSTR(notify.notify.out.changes[0].name, "subdir-name", STR_UNICODE);
/* and now from the 1st notify */
status = smb_raw_changenotify_recv(req2, mem_ctx, &notify);
CHECK_STATUS(status, NT_STATUS_OK);
- CHECK_VAL(notify.out.num_changes, 1);
+ CHECK_VAL(notify.notify.out.num_changes, 1);
printf("testing notify on wildcard unlink for %d files\n", count);
@@ -189,26 +189,26 @@ BOOL torture_raw_notify(void)
status = smb_raw_changenotify_recv(req, mem_ctx, &notify);
CHECK_STATUS(status, NT_STATUS_OK);
- CHECK_VAL(notify.out.num_changes, 1);
- CHECK_VAL(notify.out.changes[0].action, NOTIFY_ACTION_REMOVED);
- CHECK_WSTR(notify.out.changes[0].name, "test0.txt", STR_UNICODE);
+ CHECK_VAL(notify.notify.out.num_changes, 1);
+ CHECK_VAL(notify.notify.out.changes[0].action, NOTIFY_ACTION_REMOVED);
+ CHECK_WSTR(notify.notify.out.changes[0].name, "test0.txt", STR_UNICODE);
/* and we now see the rest of the unlink calls */
req = smb_raw_changenotify_send(cli->tree, &notify);
status = smb_raw_changenotify_recv(req, mem_ctx, &notify);
CHECK_STATUS(status, NT_STATUS_OK);
- CHECK_VAL(notify.out.num_changes, count-1);
- for (i=0;i<notify.out.num_changes;i++) {
- CHECK_VAL(notify.out.changes[i].action, NOTIFY_ACTION_REMOVED);
+ CHECK_VAL(notify.notify.out.num_changes, count-1);
+ for (i=0;i<notify.notify.out.num_changes;i++) {
+ CHECK_VAL(notify.notify.out.changes[i].action, NOTIFY_ACTION_REMOVED);
}
- notify.in.fnum = fnum2;
+ notify.notify.file.fnum = fnum2;
req = smb_raw_changenotify_send(cli->tree, &notify);
status = smb_raw_changenotify_recv(req, mem_ctx, &notify);
CHECK_STATUS(status, NT_STATUS_OK);
- CHECK_VAL(notify.out.num_changes, count-1);
- for (i=0;i<notify.out.num_changes;i++) {
- CHECK_VAL(notify.out.changes[i].action, NOTIFY_ACTION_REMOVED);
+ CHECK_VAL(notify.notify.out.num_changes, count-1);
+ for (i=0;i<notify.notify.out.num_changes;i++) {
+ CHECK_VAL(notify.notify.out.changes[i].action, NOTIFY_ACTION_REMOVED);
}
done:
diff --git a/source4/torture/raw/open.c b/source4/torture/raw/open.c
index 1346a075f2..06b78a547c 100644
--- a/source4/torture/raw/open.c
+++ b/source4/torture/raw/open.c
@@ -87,7 +87,7 @@ static const char *rdwr_string(enum rdwr_mode m)
#define CHECK_TIME(t, field) do { \
time_t t1, t2; \
finfo.all_info.level = RAW_FILEINFO_ALL_INFO; \
- finfo.all_info.in.fname = fname; \
+ finfo.all_info.file.path = fname; \
status = smb_raw_pathinfo(cli->tree, mem_ctx, &finfo); \
CHECK_STATUS(status, NT_STATUS_OK); \
t1 = t & ~1; \
@@ -104,7 +104,7 @@ static const char *rdwr_string(enum rdwr_mode m)
#define CHECK_NTTIME(t, field) do { \
NTTIME t2; \
finfo.all_info.level = RAW_FILEINFO_ALL_INFO; \
- finfo.all_info.in.fname = fname; \
+ finfo.all_info.file.path = fname; \
status = smb_raw_pathinfo(cli->tree, mem_ctx, &finfo); \
CHECK_STATUS(status, NT_STATUS_OK); \
t2 = finfo.all_info.out.field; \
@@ -119,7 +119,7 @@ static const char *rdwr_string(enum rdwr_mode m)
#define CHECK_ALL_INFO(v, field) do { \
finfo.all_info.level = RAW_FILEINFO_ALL_INFO; \
- finfo.all_info.in.fname = fname; \
+ finfo.all_info.file.path = fname; \
status = smb_raw_pathinfo(cli->tree, mem_ctx, &finfo); \
CHECK_STATUS(status, NT_STATUS_OK); \
if ((v) != (finfo.all_info.out.field)) { \
@@ -139,7 +139,7 @@ static const char *rdwr_string(enum rdwr_mode m)
#define SET_ATTRIB(sattrib) do { \
union smb_setfileinfo sfinfo; \
sfinfo.generic.level = RAW_SFILEINFO_BASIC_INFORMATION; \
- sfinfo.generic.file.fname = fname; \
+ sfinfo.generic.file.path = fname; \
ZERO_STRUCT(sfinfo.basic_info.in); \
sfinfo.basic_info.in.attrib = sattrib; \
status = smb_raw_setpathinfo(cli->tree, &sfinfo); \
@@ -168,7 +168,7 @@ static BOOL test_open(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.openold.in.search_attrs = 0;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_NOT_FOUND);
- fnum = io.openold.out.fnum;
+ fnum = io.openold.file.fnum;
smbcli_unlink(cli->tree, fname);
CREATE_FILE;
@@ -176,12 +176,12 @@ static BOOL test_open(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.openold.out.fnum;
+ fnum = io.openold.file.fnum;
CHECK_RDWR(fnum, RDWR_RDWR);
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum2 = io.openold.out.fnum;
+ fnum2 = io.openold.file.fnum;
CHECK_RDWR(fnum2, RDWR_RDWR);
smbcli_close(cli->tree, fnum2);
smbcli_close(cli->tree, fnum);
@@ -194,21 +194,21 @@ static BOOL test_open(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.openold.in.open_mode = OPEN_FLAGS_OPEN_READ;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.openold.out.fnum;
+ fnum = io.openold.file.fnum;
CHECK_RDWR(fnum, RDWR_RDONLY);
smbcli_close(cli->tree, fnum);
io.openold.in.open_mode = OPEN_FLAGS_OPEN_WRITE;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.openold.out.fnum;
+ fnum = io.openold.file.fnum;
CHECK_RDWR(fnum, RDWR_WRONLY);
smbcli_close(cli->tree, fnum);
io.openold.in.open_mode = OPEN_FLAGS_OPEN_RDWR;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.openold.out.fnum;
+ fnum = io.openold.file.fnum;
CHECK_RDWR(fnum, RDWR_RDWR);
smbcli_close(cli->tree, fnum);
@@ -216,7 +216,7 @@ static BOOL test_open(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.openold.in.open_mode = OPEN_FLAGS_OPEN_RDWR | OPEN_FLAGS_DENY_WRITE;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.openold.out.fnum;
+ fnum = io.openold.file.fnum;
CHECK_RDWR(fnum, RDWR_RDWR);
if (io.openold.in.open_mode != io.openold.out.rmode) {
@@ -231,7 +231,7 @@ static BOOL test_open(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.openold.in.open_mode = OPEN_FLAGS_OPEN_READ | OPEN_FLAGS_DENY_NONE;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum2 = io.openold.out.fnum;
+ fnum2 = io.openold.file.fnum;
CHECK_RDWR(fnum2, RDWR_RDONLY);
smbcli_close(cli->tree, fnum);
smbcli_close(cli->tree, fnum2);
@@ -244,7 +244,7 @@ static BOOL test_open(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.openold.in.open_mode = OPEN_FLAGS_OPEN_READ;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.openold.out.fnum;
+ fnum = io.openold.file.fnum;
/* check other reply fields */
CHECK_TIME(io.openold.out.write_time, write_time);
@@ -325,7 +325,7 @@ static BOOL test_openx(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
ret = False;
}
if (NT_STATUS_IS_OK(status)) {
- smbcli_close(cli->tree, io.openx.out.fnum);
+ smbcli_close(cli->tree, io.openx.file.fnum);
}
if (open_funcs[i].with_file) {
smbcli_unlink(cli->tree, fname);
@@ -338,7 +338,7 @@ static BOOL test_openx(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.openx.in.open_func = OPENX_OPEN_FUNC_OPEN | OPENX_OPEN_FUNC_CREATE;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.openx.out.fnum;
+ fnum = io.openx.file.fnum;
CHECK_ALL_INFO(io.openx.out.size, size);
CHECK_TIME(io.openx.out.write_time, write_time);
@@ -363,7 +363,7 @@ static BOOL test_openx(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.openx.in.open_func = OPENX_OPEN_FUNC_OPEN;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.openx.out.fnum;
+ fnum = io.openx.file.fnum;
CHECK_ALL_INFO(io.openx.out.size, size);
CHECK_TIME(io.openx.out.write_time, write_time);
@@ -379,12 +379,12 @@ static BOOL test_openx(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.openx.in.search_attrs = FILE_ATTRIBUTE_HIDDEN;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- smbcli_close(cli->tree, io.openx.out.fnum);
+ smbcli_close(cli->tree, io.openx.file.fnum);
io.openx.in.search_attrs = 0;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- smbcli_close(cli->tree, io.openx.out.fnum);
+ smbcli_close(cli->tree, io.openx.file.fnum);
SET_ATTRIB(FILE_ATTRIBUTE_NORMAL);
smbcli_unlink(cli->tree, fname);
@@ -397,7 +397,7 @@ static BOOL test_openx(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
CHECK_STATUS(status, NT_STATUS_OK);
CHECK_ALL_INFO(FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_ARCHIVE,
attrib & ~FILE_ATTRIBUTE_NONINDEXED);
- smbcli_close(cli->tree, io.openx.out.fnum);
+ smbcli_close(cli->tree, io.openx.file.fnum);
smbcli_unlink(cli->tree, fname);
/* check timeout on create - win2003 ignores the timeout! */
@@ -406,7 +406,7 @@ static BOOL test_openx(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.openx.in.open_mode = OPENX_MODE_ACCESS_RDWR | OPENX_MODE_DENY_ALL;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.openx.out.fnum;
+ fnum = io.openx.file.fnum;
io.openx.in.timeout = 20000;
tv = timeval_current();
@@ -433,7 +433,7 @@ static BOOL test_openx(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.openx.in.timeout = 0;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- smbcli_close(cli->tree, io.openx.out.fnum);
+ smbcli_close(cli->tree, io.openx.file.fnum);
/* check the extended return flag */
io.openx.in.flags = OPENX_FLAGS_ADDITIONAL_INFO | OPENX_FLAGS_EXTENDED_RETURN;
@@ -441,7 +441,7 @@ static BOOL test_openx(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
CHECK_VAL(io.openx.out.access_mask, SEC_STD_ALL);
- smbcli_close(cli->tree, io.openx.out.fnum);
+ smbcli_close(cli->tree, io.openx.file.fnum);
io.openx.in.fname = "\\A.+,;=[].B";
status = smb_raw_open(cli->tree, mem_ctx, &io);
@@ -467,8 +467,8 @@ static BOOL test_openx(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
CHECK_STATUS(status, NT_STATUS_OK);
/* Can we read and write ? */
- CHECK_RDWR(io.openx.out.fnum, RDWR_RDONLY);
- smbcli_close(cli->tree, io.openx.out.fnum);
+ CHECK_RDWR(io.openx.file.fnum, RDWR_RDONLY);
+ smbcli_close(cli->tree, io.openx.file.fnum);
smbcli_unlink(cli->tree, fname);
done:
@@ -563,7 +563,7 @@ static BOOL test_t2open(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
ret = False;
}
if (NT_STATUS_IS_OK(status)) {
- smbcli_close(cli->tree, io.t2open.out.fnum);
+ smbcli_close(cli->tree, io.t2open.file.fnum);
}
}
@@ -576,7 +576,7 @@ static BOOL test_t2open(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.t2open.in.fname = fname;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.t2open.out.fnum;
+ fnum = io.t2open.file.fnum;
CHECK_ALL_INFO(io.t2open.out.size, size);
#if 0
@@ -603,11 +603,11 @@ static BOOL test_t2open(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- smbcli_close(cli->tree, io.t2open.out.fnum);
+ smbcli_close(cli->tree, io.t2open.file.fnum);
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- smbcli_close(cli->tree, io.t2open.out.fnum);
+ smbcli_close(cli->tree, io.t2open.file.fnum);
SET_ATTRIB(FILE_ATTRIBUTE_NORMAL);
smbcli_unlink(cli->tree, fname);
@@ -704,7 +704,7 @@ static BOOL test_ntcreatex(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
ret = False;
}
if (NT_STATUS_IS_OK(status) || open_funcs[i].with_file) {
- smbcli_close(cli->tree, io.ntcreatex.out.fnum);
+ smbcli_close(cli->tree, io.ntcreatex.file.fnum);
smbcli_unlink(cli->tree, fname);
}
}
@@ -714,7 +714,7 @@ static BOOL test_ntcreatex(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.ntcreatex.out.fnum;
+ fnum = io.ntcreatex.file.fnum;
CHECK_VAL(io.ntcreatex.out.oplock_level, 0);
CHECK_VAL(io.ntcreatex.out.create_action, NTCREATEX_ACTION_CREATED);
@@ -741,7 +741,7 @@ static BOOL test_ntcreatex(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.ntcreatex.in.open_disposition = NTCREATEX_DISP_OPEN;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.ntcreatex.out.fnum;
+ fnum = io.ntcreatex.file.fnum;
CHECK_VAL(io.ntcreatex.out.oplock_level, 0);
CHECK_VAL(io.ntcreatex.out.create_action, NTCREATEX_ACTION_EXISTED);
@@ -778,7 +778,7 @@ static BOOL test_ntcreatex(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.ntcreatex.in.share_access = NTCREATEX_SHARE_ACCESS_READ | NTCREATEX_SHARE_ACCESS_WRITE;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.ntcreatex.out.fnum;
+ fnum = io.ntcreatex.file.fnum;
CHECK_VAL(io.ntcreatex.out.oplock_level, 0);
CHECK_VAL(io.ntcreatex.out.create_action, NTCREATEX_ACTION_CREATED);
@@ -879,7 +879,7 @@ static BOOL test_nttrans_create(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
ret = False;
}
if (NT_STATUS_IS_OK(status) || open_funcs[i].with_file) {
- smbcli_close(cli->tree, io.ntcreatex.out.fnum);
+ smbcli_close(cli->tree, io.ntcreatex.file.fnum);
smbcli_unlink(cli->tree, fname);
}
}
@@ -889,7 +889,7 @@ static BOOL test_nttrans_create(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.ntcreatex.out.fnum;
+ fnum = io.ntcreatex.file.fnum;
CHECK_VAL(io.ntcreatex.out.oplock_level, 0);
CHECK_VAL(io.ntcreatex.out.create_action, NTCREATEX_ACTION_CREATED);
@@ -916,7 +916,7 @@ static BOOL test_nttrans_create(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.ntcreatex.in.open_disposition = NTCREATEX_DISP_OPEN;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.ntcreatex.out.fnum;
+ fnum = io.ntcreatex.file.fnum;
CHECK_VAL(io.ntcreatex.out.oplock_level, 0);
CHECK_VAL(io.ntcreatex.out.create_action, NTCREATEX_ACTION_EXISTED);
@@ -953,7 +953,7 @@ static BOOL test_nttrans_create(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.ntcreatex.in.share_access = NTCREATEX_SHARE_ACCESS_READ | NTCREATEX_SHARE_ACCESS_WRITE;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.ntcreatex.out.fnum;
+ fnum = io.ntcreatex.file.fnum;
CHECK_VAL(io.ntcreatex.out.oplock_level, 0);
CHECK_VAL(io.ntcreatex.out.create_action, NTCREATEX_ACTION_CREATED);
@@ -1019,7 +1019,7 @@ static BOOL test_ntcreatex_brlocked(struct smbcli_state *cli, TALLOC_CTX *mem_ct
CHECK_STATUS(status, NT_STATUS_OK);
io2.lockx.level = RAW_LOCK_LOCKX;
- io2.lockx.in.fnum = io.ntcreatex.out.fnum;
+ io2.lockx.file.fnum = io.ntcreatex.file.fnum;
io2.lockx.in.mode = LOCKING_ANDX_LARGE_FILES;
io2.lockx.in.timeout = 0;
io2.lockx.in.ulock_cnt = 0;
@@ -1050,8 +1050,8 @@ static BOOL test_ntcreatex_brlocked(struct smbcli_state *cli, TALLOC_CTX *mem_ct
CHECK_STATUS(status, NT_STATUS_OK);
done:
- smbcli_close(cli->tree, io.ntcreatex.out.fnum);
- smbcli_close(cli->tree, io1.ntcreatex.out.fnum);
+ smbcli_close(cli->tree, io.ntcreatex.file.fnum);
+ smbcli_close(cli->tree, io1.ntcreatex.file.fnum);
smbcli_unlink(cli->tree, fname);
return ret;
}
@@ -1077,7 +1077,7 @@ static BOOL test_mknew(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.mknew.in.fname = fname;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.mknew.out.fnum;
+ fnum = io.mknew.file.fnum;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_COLLISION);
@@ -1089,7 +1089,7 @@ static BOOL test_mknew(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.mknew.in.write_time = basetime;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.mknew.out.fnum;
+ fnum = io.mknew.file.fnum;
CHECK_TIME(basetime, write_time);
smbcli_close(cli->tree, fnum);
@@ -1099,7 +1099,7 @@ static BOOL test_mknew(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.mknew.in.attrib = FILE_ATTRIBUTE_HIDDEN;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.mknew.out.fnum;
+ fnum = io.mknew.file.fnum;
CHECK_ALL_INFO(FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_ARCHIVE,
attrib & ~FILE_ATTRIBUTE_NONINDEXED);
@@ -1132,12 +1132,12 @@ static BOOL test_create(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.create.in.fname = fname;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.create.out.fnum;
+ fnum = io.create.file.fnum;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- smbcli_close(cli->tree, io.create.out.fnum);
+ smbcli_close(cli->tree, io.create.file.fnum);
smbcli_close(cli->tree, fnum);
smbcli_unlink(cli->tree, fname);
@@ -1145,7 +1145,7 @@ static BOOL test_create(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.create.in.write_time = basetime;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.create.out.fnum;
+ fnum = io.create.file.fnum;
CHECK_TIME(basetime, write_time);
smbcli_close(cli->tree, fnum);
@@ -1155,7 +1155,7 @@ static BOOL test_create(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.create.in.attrib = FILE_ATTRIBUTE_HIDDEN;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.create.out.fnum;
+ fnum = io.create.file.fnum;
CHECK_ALL_INFO(FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_ARCHIVE,
attrib & ~FILE_ATTRIBUTE_NONINDEXED);
@@ -1188,12 +1188,12 @@ static BOOL test_ctemp(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.ctemp.in.directory = BASEDIR;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.ctemp.out.fnum;
+ fnum = io.ctemp.file.fnum;
name = io.ctemp.out.name;
finfo.generic.level = RAW_FILEINFO_NAME_INFO;
- finfo.generic.in.fnum = fnum;
+ finfo.generic.file.fnum = fnum;
status = smb_raw_fileinfo(cli->tree, mem_ctx, &finfo);
CHECK_STATUS(status, NT_STATUS_OK);
@@ -1251,7 +1251,7 @@ static BOOL test_chained(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.openxreadx.out.fnum;
+ fnum = io.openxreadx.file.fnum;
if (memcmp(buf, buf2, sizeof(buf)) != 0) {
d_printf("wrong data in reply buffer\n");
diff --git a/source4/torture/raw/oplock.c b/source4/torture/raw/oplock.c
index 6fa4c514b3..3d804f8572 100644
--- a/source4/torture/raw/oplock.c
+++ b/source4/torture/raw/oplock.c
@@ -88,7 +88,7 @@ static BOOL oplock_handler_close(struct smbcli_transport *transport, uint16_t ti
printf("Closing in oplock handler\n");
io.close.level = RAW_CLOSE_CLOSE;
- io.close.in.fnum = fnum;
+ io.close.file.fnum = fnum;
io.close.in.write_time = 0;
req = smb_raw_close_send(tree, &io);
if (req == NULL) {
@@ -111,7 +111,7 @@ static BOOL test_oplock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
NTSTATUS status;
BOOL ret = True;
union smb_open io;
- struct smb_unlink unl;
+ union smb_unlink unl;
union smb_read rd;
uint16_t fnum=0, fnum2=0;
@@ -141,12 +141,12 @@ static BOOL test_oplock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.ntcreatex.out.fnum;
+ fnum = io.ntcreatex.file.fnum;
CHECK_VAL(io.ntcreatex.out.oplock_level, EXCLUSIVE_OPLOCK_RETURN);
printf("unlink it - should be no break\n");
- unl.in.pattern = fname;
- unl.in.attrib = 0;
+ unl.unlink.in.pattern = fname;
+ unl.unlink.in.attrib = 0;
status = smb_raw_unlink(cli->tree, &unl);
CHECK_STATUS(status, NT_STATUS_SHARING_VIOLATION);
CHECK_VAL(break_info.count, 0);
@@ -164,12 +164,12 @@ static BOOL test_oplock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
NTCREATEX_FLAGS_REQUEST_BATCH_OPLOCK;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.ntcreatex.out.fnum;
+ fnum = io.ntcreatex.file.fnum;
CHECK_VAL(io.ntcreatex.out.oplock_level, BATCH_OPLOCK_RETURN);
printf("unlink should generate a break\n");
- unl.in.pattern = fname;
- unl.in.attrib = 0;
+ unl.unlink.in.pattern = fname;
+ unl.unlink.in.attrib = 0;
status = smb_raw_unlink(cli->tree, &unl);
CHECK_STATUS(status, NT_STATUS_SHARING_VIOLATION);
@@ -188,11 +188,11 @@ static BOOL test_oplock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
NTCREATEX_FLAGS_REQUEST_BATCH_OPLOCK;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.ntcreatex.out.fnum;
+ fnum = io.ntcreatex.file.fnum;
CHECK_VAL(io.ntcreatex.out.oplock_level, BATCH_OPLOCK_RETURN);
- unl.in.pattern = fname;
- unl.in.attrib = 0;
+ unl.unlink.in.pattern = fname;
+ unl.unlink.in.attrib = 0;
ZERO_STRUCT(break_info);
status = smb_raw_unlink(cli->tree, &unl);
CHECK_STATUS(status, NT_STATUS_OK);
@@ -212,11 +212,11 @@ static BOOL test_oplock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
NTCREATEX_FLAGS_REQUEST_BATCH_OPLOCK;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.ntcreatex.out.fnum;
+ fnum = io.ntcreatex.file.fnum;
CHECK_VAL(io.ntcreatex.out.oplock_level, BATCH_OPLOCK_RETURN);
rd.read.level = RAW_READ_READ;
- rd.read.in.fnum = fnum;
+ rd.read.file.fnum = fnum;
rd.read.in.count = 1;
rd.read.in.offset = 0;
rd.read.in.remaining = 0;
@@ -235,7 +235,7 @@ static BOOL test_oplock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
NTCREATEX_FLAGS_REQUEST_BATCH_OPLOCK;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.ntcreatex.out.fnum;
+ fnum = io.ntcreatex.file.fnum;
CHECK_VAL(io.ntcreatex.out.oplock_level, BATCH_OPLOCK_RETURN);
ZERO_STRUCT(break_info);
@@ -259,7 +259,7 @@ static BOOL test_oplock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
NTCREATEX_FLAGS_REQUEST_BATCH_OPLOCK;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum2 = io.ntcreatex.out.fnum;
+ fnum2 = io.ntcreatex.file.fnum;
CHECK_VAL(io.ntcreatex.out.oplock_level, BATCH_OPLOCK_RETURN);
ZERO_STRUCT(break_info);
@@ -269,7 +269,7 @@ static BOOL test_oplock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
NTCREATEX_FLAGS_REQUEST_BATCH_OPLOCK;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.ntcreatex.out.fnum;
+ fnum = io.ntcreatex.file.fnum;
CHECK_VAL(io.ntcreatex.out.oplock_level, BATCH_OPLOCK_RETURN);
CHECK_VAL(break_info.count, 1);
@@ -288,7 +288,7 @@ static BOOL test_oplock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
NTCREATEX_FLAGS_REQUEST_BATCH_OPLOCK;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.ntcreatex.out.fnum;
+ fnum = io.ntcreatex.file.fnum;
CHECK_VAL(io.ntcreatex.out.oplock_level, BATCH_OPLOCK_RETURN);
ZERO_STRUCT(break_info);
@@ -300,7 +300,7 @@ static BOOL test_oplock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.ntcreatex.in.access_mask = SEC_FILE_READ_ATTRIBUTE|SEC_FILE_WRITE_ATTRIBUTE|SEC_STD_SYNCHRONIZE;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum2 = io.ntcreatex.out.fnum;
+ fnum2 = io.ntcreatex.file.fnum;
CHECK_VAL(io.ntcreatex.out.oplock_level, NO_OPLOCK_RETURN);
CHECK_VAL(break_info.count, 0);
CHECK_VAL(break_info.fnum, 0);
@@ -319,7 +319,7 @@ static BOOL test_oplock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.ntcreatex.in.open_disposition = NTCREATEX_DISP_CREATE;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.ntcreatex.out.fnum;
+ fnum = io.ntcreatex.file.fnum;
CHECK_VAL(io.ntcreatex.out.oplock_level, BATCH_OPLOCK_RETURN);
printf("Subsequent normal open should break oplock on attribute only open to level II\n");
@@ -334,7 +334,7 @@ static BOOL test_oplock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.ntcreatex.in.open_disposition = NTCREATEX_DISP_OPEN;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum2 = io.ntcreatex.out.fnum;
+ fnum2 = io.ntcreatex.file.fnum;
CHECK_VAL(break_info.count, 1);
CHECK_VAL(break_info.fnum, fnum);
CHECK_VAL(break_info.failures, 0);
@@ -351,7 +351,7 @@ static BOOL test_oplock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.ntcreatex.in.open_disposition = NTCREATEX_DISP_OPEN;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum2 = io.ntcreatex.out.fnum;
+ fnum2 = io.ntcreatex.file.fnum;
CHECK_VAL(break_info.count, 0);
CHECK_VAL(break_info.failures, 0);
CHECK_VAL(io.ntcreatex.out.oplock_level, LEVEL_II_OPLOCK_RETURN);
@@ -362,7 +362,7 @@ static BOOL test_oplock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
{
union smb_write wr;
wr.write.level = RAW_WRITE_WRITE;
- wr.write.in.fnum = fnum2;
+ wr.write.file.fnum = fnum2;
wr.write.in.count = 1;
wr.write.in.offset = 0;
wr.write.in.remaining = 0;
@@ -379,7 +379,7 @@ static BOOL test_oplock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
{
union smb_write wr;
wr.write.level = RAW_WRITE_WRITE;
- wr.write.in.fnum = fnum2;
+ wr.write.file.fnum = fnum2;
wr.write.in.count = 1;
wr.write.in.offset = 0;
wr.write.in.remaining = 0;
@@ -407,7 +407,7 @@ static BOOL test_oplock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.ntcreatex.in.open_disposition = NTCREATEX_DISP_OPEN;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.ntcreatex.out.fnum;
+ fnum = io.ntcreatex.file.fnum;
CHECK_VAL(break_info.count, 0);
CHECK_VAL(break_info.fnum, 0);
CHECK_VAL(break_info.failures, 0);
@@ -423,7 +423,7 @@ static BOOL test_oplock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.ntcreatex.in.open_disposition = NTCREATEX_DISP_OPEN;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum2 = io.ntcreatex.out.fnum;
+ fnum2 = io.ntcreatex.file.fnum;
CHECK_VAL(break_info.count, 0);
CHECK_VAL(break_info.fnum, 0);
CHECK_VAL(break_info.failures, 0);
@@ -433,7 +433,7 @@ static BOOL test_oplock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
{
union smb_write wr;
wr.write.level = RAW_WRITE_WRITE;
- wr.write.in.fnum = fnum;
+ wr.write.file.fnum = fnum;
wr.write.in.count = 1;
wr.write.in.offset = 0;
wr.write.in.remaining = 0;
@@ -450,7 +450,7 @@ static BOOL test_oplock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
{
union smb_write wr;
wr.write.level = RAW_WRITE_WRITE;
- wr.write.in.fnum = fnum;
+ wr.write.file.fnum = fnum;
wr.write.in.count = 1;
wr.write.in.offset = 0;
wr.write.in.remaining = 0;
diff --git a/source4/torture/raw/qfileinfo.c b/source4/torture/raw/qfileinfo.c
index 6ed57227ac..bd5208db28 100644
--- a/source4/torture/raw/qfileinfo.c
+++ b/source4/torture/raw/qfileinfo.c
@@ -184,14 +184,14 @@ BOOL torture_raw_qfileinfo(void)
for (i=0; levels[i].name; i++) {
if (!levels[i].only_paths) {
levels[i].fnum_finfo.generic.level = levels[i].level;
- levels[i].fnum_finfo.generic.in.fnum = fnum;
+ levels[i].fnum_finfo.generic.file.fnum = fnum;
levels[i].fnum_status = smb_raw_fileinfo(cli->tree, mem_ctx,
&levels[i].fnum_finfo);
}
if (!levels[i].only_handles) {
levels[i].fname_finfo.generic.level = levels[i].level;
- levels[i].fname_finfo.generic.in.fname = talloc_strdup(mem_ctx, fname);
+ levels[i].fname_finfo.generic.file.path = talloc_strdup(mem_ctx, fname);
levels[i].fname_status = smb_raw_pathinfo(cli->tree, mem_ctx,
&levels[i].fname_finfo);
}
diff --git a/source4/torture/raw/read.c b/source4/torture/raw/read.c
index aab879a1d1..2e5a06df63 100644
--- a/source4/torture/raw/read.c
+++ b/source4/torture/raw/read.c
@@ -110,7 +110,7 @@ static BOOL test_read(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
}
printf("Trying empty file read\n");
- io.read.in.fnum = fnum;
+ io.read.file.fnum = fnum;
io.read.in.count = 1;
io.read.in.offset = 0;
io.read.in.remaining = 0;
@@ -127,15 +127,15 @@ static BOOL test_read(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
CHECK_VALUE(io.read.out.nread, 0);
printf("Trying bad fnum\n");
- io.read.in.fnum = fnum+1;
+ io.read.file.fnum = fnum+1;
status = smb_raw_read(cli->tree, &io);
CHECK_STATUS(status, NT_STATUS_INVALID_HANDLE);
- io.read.in.fnum = fnum;
+ io.read.file.fnum = fnum;
smbcli_write(cli->tree, fnum, 0, test_data, 0, strlen(test_data));
printf("Trying small read\n");
- io.read.in.fnum = fnum;
+ io.read.file.fnum = fnum;
io.read.in.offset = 0;
io.read.in.remaining = 0;
io.read.in.count = strlen(test_data);
@@ -234,7 +234,7 @@ static BOOL test_lockread(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
}
printf("Trying empty file read\n");
- io.lockread.in.fnum = fnum;
+ io.lockread.file.fnum = fnum;
io.lockread.in.count = 1;
io.lockread.in.offset = 1;
io.lockread.in.remaining = 0;
@@ -258,15 +258,15 @@ static BOOL test_lockread(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
smbcli_unlock(cli->tree, fnum, 1, 1);
printf("Trying bad fnum\n");
- io.lockread.in.fnum = fnum+1;
+ io.lockread.file.fnum = fnum+1;
status = smb_raw_read(cli->tree, &io);
CHECK_STATUS(status, NT_STATUS_INVALID_HANDLE);
- io.lockread.in.fnum = fnum;
+ io.lockread.file.fnum = fnum;
smbcli_write(cli->tree, fnum, 0, test_data, 0, strlen(test_data));
printf("Trying small read\n");
- io.lockread.in.fnum = fnum;
+ io.lockread.file.fnum = fnum;
io.lockread.in.offset = 0;
io.lockread.in.remaining = 0;
io.lockread.in.count = strlen(test_data);
@@ -377,7 +377,7 @@ static BOOL test_readx(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
printf("Trying empty file read\n");
io.generic.level = RAW_READ_READX;
- io.readx.in.fnum = fnum;
+ io.readx.file.fnum = fnum;
io.readx.in.mincnt = 1;
io.readx.in.maxcnt = 1;
io.readx.in.offset = 0;
@@ -400,15 +400,15 @@ static BOOL test_readx(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
CHECK_VALUE(io.readx.out.compaction_mode, 0);
printf("Trying bad fnum\n");
- io.readx.in.fnum = fnum+1;
+ io.readx.file.fnum = fnum+1;
status = smb_raw_read(cli->tree, &io);
CHECK_STATUS(status, NT_STATUS_INVALID_HANDLE);
- io.readx.in.fnum = fnum;
+ io.readx.file.fnum = fnum;
smbcli_write(cli->tree, fnum, 0, test_data, 0, strlen(test_data));
printf("Trying small read\n");
- io.readx.in.fnum = fnum;
+ io.readx.file.fnum = fnum;
io.readx.in.offset = 0;
io.readx.in.remaining = 0;
io.readx.in.mincnt = strlen(test_data);
@@ -571,7 +571,7 @@ static BOOL test_readbraw(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
printf("Trying empty file read\n");
io.generic.level = RAW_READ_READBRAW;
- io.readbraw.in.fnum = fnum;
+ io.readbraw.file.fnum = fnum;
io.readbraw.in.mincnt = 1;
io.readbraw.in.maxcnt = 1;
io.readbraw.in.offset = 0;
@@ -590,16 +590,16 @@ static BOOL test_readbraw(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
CHECK_VALUE(io.readbraw.out.nread, 0);
printf("Trying bad fnum\n");
- io.readbraw.in.fnum = fnum+1;
+ io.readbraw.file.fnum = fnum+1;
status = smb_raw_read(cli->tree, &io);
CHECK_STATUS(status, NT_STATUS_OK);
CHECK_VALUE(io.readbraw.out.nread, 0);
- io.readbraw.in.fnum = fnum;
+ io.readbraw.file.fnum = fnum;
smbcli_write(cli->tree, fnum, 0, test_data, 0, strlen(test_data));
printf("Trying small read\n");
- io.readbraw.in.fnum = fnum;
+ io.readbraw.file.fnum = fnum;
io.readbraw.in.offset = 0;
io.readbraw.in.mincnt = strlen(test_data);
io.readbraw.in.maxcnt = strlen(test_data);
diff --git a/source4/torture/raw/rename.c b/source4/torture/raw/rename.c
index c1b24f2b3a..c84621b2be 100644
--- a/source4/torture/raw/rename.c
+++ b/source4/torture/raw/rename.c
@@ -78,7 +78,7 @@ static BOOL test_mv(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
status = smb_raw_open(cli->tree, mem_ctx, &op);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = op.ntcreatex.out.fnum;
+ fnum = op.ntcreatex.file.fnum;
io.generic.level = RAW_RENAME_RENAME;
io.rename.in.pattern1 = fname1;
@@ -98,7 +98,7 @@ static BOOL test_mv(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
NTCREATEX_SHARE_ACCESS_WRITE;
status = smb_raw_open(cli->tree, mem_ctx, &op);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = op.ntcreatex.out.fnum;
+ fnum = op.ntcreatex.file.fnum;
printf("trying rename while first file open with SHARE_ACCESS_DELETE\n");
status = smb_raw_rename(cli->tree, &io);
@@ -250,13 +250,13 @@ static BOOL test_ntrename(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
torture_set_file_attribute(cli->tree, fname1, FILE_ATTRIBUTE_SYSTEM);
finfo.generic.level = RAW_FILEINFO_ALL_INFO;
- finfo.generic.in.fname = fname2;
+ finfo.generic.file.path = fname2;
status = smb_raw_pathinfo(cli->tree, mem_ctx, &finfo);
CHECK_STATUS(status, NT_STATUS_OK);
CHECK_VALUE(finfo.all_info.out.nlink, 2);
CHECK_VALUE(finfo.all_info.out.attrib, FILE_ATTRIBUTE_SYSTEM);
- finfo.generic.in.fname = fname1;
+ finfo.generic.file.path = fname1;
status = smb_raw_pathinfo(cli->tree, mem_ctx, &finfo);
CHECK_STATUS(status, NT_STATUS_OK);
CHECK_VALUE(finfo.all_info.out.nlink, 2);
@@ -266,7 +266,7 @@ static BOOL test_ntrename(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
smbcli_unlink(cli->tree, fname2);
- finfo.generic.in.fname = fname1;
+ finfo.generic.file.path = fname1;
status = smb_raw_pathinfo(cli->tree, mem_ctx, &finfo);
CHECK_STATUS(status, NT_STATUS_OK);
CHECK_VALUE(finfo.all_info.out.nlink, 1);
@@ -281,14 +281,14 @@ static BOOL test_ntrename(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
CHECK_STATUS(status, NT_STATUS_OK);
finfo.generic.level = RAW_FILEINFO_ALL_INFO;
- finfo.generic.in.fname = fname1;
+ finfo.generic.file.path = fname1;
status = smb_raw_pathinfo(cli->tree, mem_ctx, &finfo);
CHECK_STATUS(status, NT_STATUS_OK);
CHECK_VALUE(finfo.all_info.out.nlink, 1);
CHECK_VALUE(finfo.all_info.out.attrib, FILE_ATTRIBUTE_NORMAL);
finfo.generic.level = RAW_FILEINFO_ALL_INFO;
- finfo.generic.in.fname = fname2;
+ finfo.generic.file.path = fname2;
status = smb_raw_pathinfo(cli->tree, mem_ctx, &finfo);
CHECK_STATUS(status, NT_STATUS_OK);
CHECK_VALUE(finfo.all_info.out.nlink, 1);
@@ -297,13 +297,13 @@ static BOOL test_ntrename(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
torture_set_file_attribute(cli->tree, fname1, FILE_ATTRIBUTE_SYSTEM);
finfo.generic.level = RAW_FILEINFO_ALL_INFO;
- finfo.generic.in.fname = fname2;
+ finfo.generic.file.path = fname2;
status = smb_raw_pathinfo(cli->tree, mem_ctx, &finfo);
CHECK_STATUS(status, NT_STATUS_OK);
CHECK_VALUE(finfo.all_info.out.nlink, 1);
CHECK_VALUE(finfo.all_info.out.attrib, FILE_ATTRIBUTE_NORMAL);
- finfo.generic.in.fname = fname1;
+ finfo.generic.file.path = fname1;
status = smb_raw_pathinfo(cli->tree, mem_ctx, &finfo);
CHECK_STATUS(status, NT_STATUS_OK);
CHECK_VALUE(finfo.all_info.out.nlink, 1);
@@ -313,7 +313,7 @@ static BOOL test_ntrename(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
smbcli_unlink(cli->tree, fname2);
- finfo.generic.in.fname = fname1;
+ finfo.generic.file.path = fname1;
status = smb_raw_pathinfo(cli->tree, mem_ctx, &finfo);
CHECK_STATUS(status, NT_STATUS_OK);
CHECK_VALUE(finfo.all_info.out.nlink, 1);
diff --git a/source4/torture/raw/search.c b/source4/torture/raw/search.c
index 1d98c7cb5c..b601281bb8 100644
--- a/source4/torture/raw/search.c
+++ b/source4/torture/raw/search.c
@@ -187,7 +187,7 @@ static BOOL test_one_file(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
/* get the all_info file into to check against */
all_info.generic.level = RAW_FILEINFO_ALL_INFO;
- all_info.generic.in.fname = fname;
+ all_info.generic.file.path = fname;
status = smb_raw_pathinfo(cli->tree, mem_ctx, &all_info);
if (!NT_STATUS_IS_OK(status)) {
printf("RAW_FILEINFO_ALL_INFO failed - %s\n", nt_errstr(status));
@@ -196,7 +196,7 @@ static BOOL test_one_file(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
}
alt_info.generic.level = RAW_FILEINFO_ALT_NAME_INFO;
- alt_info.generic.in.fname = fname;
+ alt_info.generic.file.path = fname;
status = smb_raw_pathinfo(cli->tree, mem_ctx, &alt_info);
if (!NT_STATUS_IS_OK(status)) {
printf("RAW_FILEINFO_ALT_NAME_INFO failed - %s\n", nt_errstr(status));
@@ -205,7 +205,7 @@ static BOOL test_one_file(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
}
internal_info.generic.level = RAW_FILEINFO_INTERNAL_INFORMATION;
- internal_info.generic.in.fname = fname;
+ internal_info.generic.file.path = fname;
status = smb_raw_pathinfo(cli->tree, mem_ctx, &internal_info);
if (!NT_STATUS_IS_OK(status)) {
printf("RAW_FILEINFO_INTERNAL_INFORMATION failed - %s\n", nt_errstr(status));
@@ -214,7 +214,7 @@ static BOOL test_one_file(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
}
name_info.generic.level = RAW_FILEINFO_NAME_INFO;
- name_info.generic.in.fname = fname;
+ name_info.generic.file.path = fname;
status = smb_raw_pathinfo(cli->tree, mem_ctx, &name_info);
if (!NT_STATUS_IS_OK(status)) {
printf("RAW_FILEINFO_NAME_INFO failed - %s\n", nt_errstr(status));
@@ -1219,7 +1219,7 @@ static BOOL test_ea_list(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
smbcli_close(cli->tree, fnum);
setfile.generic.level = RAW_SFILEINFO_EA_SET;
- setfile.generic.file.fname = BASEDIR "\\file2.txt";
+ setfile.generic.file.path = BASEDIR "\\file2.txt";
setfile.ea_set.in.num_eas = 2;
setfile.ea_set.in.eas = talloc_array(mem_ctx, struct ea_struct, 2);
setfile.ea_set.in.eas[0].flags = 0;
@@ -1232,7 +1232,7 @@ static BOOL test_ea_list(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
status = smb_raw_setpathinfo(cli->tree, &setfile);
CHECK_STATUS(status, NT_STATUS_OK);
- setfile.generic.file.fname = BASEDIR "\\file3.txt";
+ setfile.generic.file.path = BASEDIR "\\file3.txt";
status = smb_raw_setpathinfo(cli->tree, &setfile);
CHECK_STATUS(status, NT_STATUS_OK);
diff --git a/source4/torture/raw/seek.c b/source4/torture/raw/seek.c
index b0993b67cc..affb4ebb34 100644
--- a/source4/torture/raw/seek.c
+++ b/source4/torture/raw/seek.c
@@ -47,7 +47,7 @@
*/
static BOOL test_seek(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
{
- struct smb_seek io;
+ union smb_seek io;
union smb_fileinfo finfo;
union smb_setfileinfo sfinfo;
NTSTATUS status;
@@ -68,72 +68,72 @@ static BOOL test_seek(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
}
finfo.generic.level = RAW_FILEINFO_POSITION_INFORMATION;
- finfo.position_information.in.fnum = fnum;
+ finfo.position_information.file.fnum = fnum;
printf("Trying bad handle\n");
- io.in.fnum = fnum+1;
- io.in.mode = SEEK_MODE_START;
- io.in.offset = 0;
+ io.lseek.file.fnum = fnum+1;
+ io.lseek.in.mode = SEEK_MODE_START;
+ io.lseek.in.offset = 0;
status = smb_raw_seek(cli->tree, &io);
CHECK_STATUS(status, NT_STATUS_INVALID_HANDLE);
printf("Trying simple seek\n");
- io.in.fnum = fnum;
- io.in.mode = SEEK_MODE_START;
- io.in.offset = 17;
+ io.lseek.file.fnum = fnum;
+ io.lseek.in.mode = SEEK_MODE_START;
+ io.lseek.in.offset = 17;
status = smb_raw_seek(cli->tree, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- CHECK_VALUE(io.out.offset, 17);
+ CHECK_VALUE(io.lseek.out.offset, 17);
status = smb_raw_fileinfo(cli->tree, mem_ctx, &finfo);
CHECK_STATUS(status, NT_STATUS_OK);
CHECK_VALUE(finfo.position_information.out.position, 0);
printf("Trying relative seek\n");
- io.in.fnum = fnum;
- io.in.mode = SEEK_MODE_CURRENT;
- io.in.offset = -3;
+ io.lseek.file.fnum = fnum;
+ io.lseek.in.mode = SEEK_MODE_CURRENT;
+ io.lseek.in.offset = -3;
status = smb_raw_seek(cli->tree, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- CHECK_VALUE(io.out.offset, 14);
+ CHECK_VALUE(io.lseek.out.offset, 14);
printf("Trying end seek\n");
- io.in.fnum = fnum;
- io.in.mode = SEEK_MODE_END;
- io.in.offset = 0;
+ io.lseek.file.fnum = fnum;
+ io.lseek.in.mode = SEEK_MODE_END;
+ io.lseek.in.offset = 0;
status = smb_raw_seek(cli->tree, &io);
CHECK_STATUS(status, NT_STATUS_OK);
finfo.generic.level = RAW_FILEINFO_ALL_INFO;
- finfo.all_info.in.fnum = fnum;
+ finfo.all_info.file.fnum = fnum;
status = smb_raw_fileinfo(cli->tree, mem_ctx, &finfo);
CHECK_STATUS(status, NT_STATUS_OK);
- CHECK_VALUE(io.out.offset, finfo.all_info.out.size);
+ CHECK_VALUE(io.lseek.out.offset, finfo.all_info.out.size);
printf("Trying max seek\n");
- io.in.fnum = fnum;
- io.in.mode = SEEK_MODE_START;
- io.in.offset = -1;
+ io.lseek.file.fnum = fnum;
+ io.lseek.in.mode = SEEK_MODE_START;
+ io.lseek.in.offset = -1;
status = smb_raw_seek(cli->tree, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- CHECK_VALUE(io.out.offset, 0xffffffff);
+ CHECK_VALUE(io.lseek.out.offset, 0xffffffff);
printf("Testing position information change\n");
finfo.generic.level = RAW_FILEINFO_POSITION_INFORMATION;
- finfo.position_information.in.fnum = fnum;
+ finfo.position_information.file.fnum = fnum;
status = smb_raw_fileinfo(cli->tree, mem_ctx, &finfo);
CHECK_STATUS(status, NT_STATUS_OK);
CHECK_VALUE(finfo.position_information.out.position, 0);
printf("Trying max overflow\n");
- io.in.fnum = fnum;
- io.in.mode = SEEK_MODE_CURRENT;
- io.in.offset = 1000;
+ io.lseek.file.fnum = fnum;
+ io.lseek.in.mode = SEEK_MODE_CURRENT;
+ io.lseek.in.offset = 1000;
status = smb_raw_seek(cli->tree, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- CHECK_VALUE(io.out.offset, 999);
+ CHECK_VALUE(io.lseek.out.offset, 999);
printf("Testing position information change\n");
finfo.generic.level = RAW_FILEINFO_POSITION_INFORMATION;
- finfo.position_information.in.fnum = fnum;
+ finfo.position_information.file.fnum = fnum;
status = smb_raw_fileinfo(cli->tree, mem_ctx, &finfo);
CHECK_STATUS(status, NT_STATUS_OK);
CHECK_VALUE(finfo.position_information.out.position, 0);
@@ -148,17 +148,17 @@ static BOOL test_seek(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
printf("Testing position information change\n");
finfo.generic.level = RAW_FILEINFO_POSITION_INFORMATION;
- finfo.position_information.in.fnum = fnum;
+ finfo.position_information.file.fnum = fnum;
status = smb_raw_fileinfo(cli->tree, mem_ctx, &finfo);
CHECK_STATUS(status, NT_STATUS_OK);
CHECK_VALUE(finfo.position_information.out.position, 0);
- io.in.fnum = fnum;
- io.in.mode = SEEK_MODE_CURRENT;
- io.in.offset = 0;
+ io.lseek.file.fnum = fnum;
+ io.lseek.in.mode = SEEK_MODE_CURRENT;
+ io.lseek.in.offset = 0;
status = smb_raw_seek(cli->tree, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- CHECK_VALUE(io.out.offset, 2);
+ CHECK_VALUE(io.lseek.out.offset, 2);
if (smbcli_read(cli->tree, fnum, c, 0, 1) != 1) {
printf("Read failed - %s\n", smbcli_errstr(cli->tree));
@@ -168,14 +168,14 @@ static BOOL test_seek(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
printf("Testing position information change\n");
finfo.generic.level = RAW_FILEINFO_POSITION_INFORMATION;
- finfo.position_information.in.fnum = fnum;
+ finfo.position_information.file.fnum = fnum;
status = smb_raw_fileinfo(cli->tree, mem_ctx, &finfo);
CHECK_STATUS(status, NT_STATUS_OK);
CHECK_VALUE(finfo.position_information.out.position, 1);
status = smb_raw_seek(cli->tree, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- CHECK_VALUE(io.out.offset, 1);
+ CHECK_VALUE(io.lseek.out.offset, 1);
printf("Testing position information\n");
fnum2 = smbcli_open(cli->tree, fname, O_RDWR, DENY_NONE);
@@ -191,13 +191,13 @@ static BOOL test_seek(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
CHECK_STATUS(status, NT_STATUS_OK);
finfo.generic.level = RAW_FILEINFO_POSITION_INFORMATION;
- finfo.position_information.in.fnum = fnum2;
+ finfo.position_information.file.fnum = fnum2;
status = smb_raw_fileinfo(cli->tree, mem_ctx, &finfo);
CHECK_STATUS(status, NT_STATUS_OK);
CHECK_VALUE(finfo.position_information.out.position, 25);
finfo.generic.level = RAW_FILEINFO_POSITION_INFORMATION;
- finfo.position_information.in.fnum = fnum;
+ finfo.position_information.file.fnum = fnum;
status = smb_raw_fileinfo(cli->tree, mem_ctx, &finfo);
CHECK_STATUS(status, NT_STATUS_OK);
CHECK_VALUE(finfo.position_information.out.position, 1);
@@ -205,19 +205,19 @@ static BOOL test_seek(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
printf("position_information via paths\n");
sfinfo.generic.level = RAW_SFILEINFO_POSITION_INFORMATION;
- sfinfo.position_information.file.fname = fname;
+ sfinfo.position_information.file.path = fname;
sfinfo.position_information.in.position = 32;
status = smb_raw_setpathinfo(cli->tree, &sfinfo);
CHECK_STATUS(status, NT_STATUS_OK);
finfo.generic.level = RAW_FILEINFO_POSITION_INFORMATION;
- finfo.position_information.in.fnum = fnum2;
+ finfo.position_information.file.fnum = fnum2;
status = smb_raw_fileinfo(cli->tree, mem_ctx, &finfo);
CHECK_STATUS(status, NT_STATUS_OK);
CHECK_VALUE(finfo.position_information.out.position, 25);
finfo.generic.level = RAW_FILEINFO_POSITION_INFORMATION;
- finfo.position_information.in.fname = fname;
+ finfo.position_information.file.path = fname;
status = smb_raw_pathinfo(cli->tree, mem_ctx, &finfo);
CHECK_STATUS(status, NT_STATUS_OK);
CHECK_VALUE(finfo.position_information.out.position, 0);
diff --git a/source4/torture/raw/setfileinfo.c b/source4/torture/raw/setfileinfo.c
index 29521980be..d67825925b 100644
--- a/source4/torture/raw/setfileinfo.c
+++ b/source4/torture/raw/setfileinfo.c
@@ -93,7 +93,7 @@ BOOL torture_raw_sfileinfo(void)
ret = False; \
} \
finfo1.generic.level = RAW_FILEINFO_ALL_INFO; \
- finfo1.generic.in.fnum = fnum; \
+ finfo1.generic.file.fnum = fnum; \
status2 = smb_raw_fileinfo(cli->tree, mem_ctx, &finfo1); \
if (!NT_STATUS_IS_OK(status2)) { \
printf("(%s) %s pathinfo - %s\n", __location__, #call, nt_errstr(status)); \
@@ -104,10 +104,10 @@ BOOL torture_raw_sfileinfo(void)
check_fnum = False; \
call_name = #call; \
sfinfo.generic.level = RAW_SFILEINFO_ ## call; \
- sfinfo.generic.file.fname = path_fname; \
+ sfinfo.generic.file.path = path_fname; \
status = smb_raw_setpathinfo(cli->tree, &sfinfo); \
if (NT_STATUS_EQUAL(status, NT_STATUS_OBJECT_NAME_NOT_FOUND)) { \
- sfinfo.generic.file.fname = path_fname_new; \
+ sfinfo.generic.file.path = path_fname_new; \
status = smb_raw_setpathinfo(cli->tree, &sfinfo); \
} \
if (!NT_STATUS_EQUAL(status, rightstatus)) { \
@@ -116,10 +116,10 @@ BOOL torture_raw_sfileinfo(void)
ret = False; \
} \
finfo1.generic.level = RAW_FILEINFO_ALL_INFO; \
- finfo1.generic.in.fname = path_fname; \
+ finfo1.generic.file.path = path_fname; \
status2 = smb_raw_pathinfo(cli->tree, mem_ctx, &finfo1); \
if (NT_STATUS_EQUAL(status2, NT_STATUS_OBJECT_NAME_NOT_FOUND)) { \
- finfo1.generic.in.fname = path_fname_new; \
+ finfo1.generic.file.path = path_fname_new; \
status2 = smb_raw_pathinfo(cli->tree, mem_ctx, &finfo1); \
} \
if (!NT_STATUS_IS_OK(status2)) { \
@@ -131,13 +131,13 @@ BOOL torture_raw_sfileinfo(void)
do { if (NT_STATUS_IS_OK(status)) { \
finfo2.generic.level = RAW_FILEINFO_ ## call; \
if (check_fnum) { \
- finfo2.generic.in.fnum = fnum; \
+ finfo2.generic.file.fnum = fnum; \
status2 = smb_raw_fileinfo(cli->tree, mem_ctx, &finfo2); \
} else { \
- finfo2.generic.in.fname = path_fname; \
+ finfo2.generic.file.path = path_fname; \
status2 = smb_raw_pathinfo(cli->tree, mem_ctx, &finfo2); \
if (NT_STATUS_EQUAL(status2, NT_STATUS_OBJECT_NAME_NOT_FOUND)) { \
- finfo2.generic.in.fname = path_fname_new; \
+ finfo2.generic.file.path = path_fname_new; \
status2 = smb_raw_pathinfo(cli->tree, mem_ctx, &finfo2); \
} \
} \
@@ -556,7 +556,7 @@ BOOL torture_raw_sfileinfo_bug(void)
smbcli_close(cli->tree, fnum);
sfinfo.generic.level = RAW_SFILEINFO_STANDARD;
- sfinfo.generic.file.fname = fname;
+ sfinfo.generic.file.path = fname;
sfinfo.standard.in.create_time = 0;
sfinfo.standard.in.access_time = 0;
diff --git a/source4/torture/raw/streams.c b/source4/torture/raw/streams.c
index 22b7d06cdd..798cc61171 100644
--- a/source4/torture/raw/streams.c
+++ b/source4/torture/raw/streams.c
@@ -128,7 +128,7 @@ static BOOL test_stream_io(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.ntcreatex.in.fname = sname1;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.ntcreatex.out.fnum;
+ fnum = io.ntcreatex.file.fnum;
ret &= check_stream(cli, mem_ctx, fname, "Stream One", NULL);
@@ -137,7 +137,7 @@ static BOOL test_stream_io(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.ntcreatex.in.fname = fname;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- smbcli_close(cli->tree, io.ntcreatex.out.fnum);
+ smbcli_close(cli->tree, io.ntcreatex.file.fnum);
printf("writing to stream\n");
retsize = smbcli_write(cli->tree, fnum, 0, "test data", 0, 9);
@@ -151,7 +151,7 @@ static BOOL test_stream_io(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.ntcreatex.in.fname = sname1;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.ntcreatex.out.fnum;
+ fnum = io.ntcreatex.file.fnum;
printf("modifying stream\n");
retsize = smbcli_write(cli->tree, fnum, 0, "MORE DATA ", 5, 10);
@@ -166,7 +166,7 @@ static BOOL test_stream_io(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.ntcreatex.in.open_disposition = NTCREATEX_DISP_OPEN_IF;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.ntcreatex.out.fnum;
+ fnum = io.ntcreatex.file.fnum;
printf("modifying stream\n");
retsize = smbcli_write(cli->tree, fnum, 0, "SECOND STREAM", 0, 13);
@@ -194,7 +194,7 @@ static BOOL test_stream_io(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.ntcreatex.in.open_disposition = NTCREATEX_DISP_OPEN;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.ntcreatex.out.fnum;
+ fnum = io.ntcreatex.file.fnum;
smbcli_close(cli->tree, fnum);
status = smbcli_unlink(cli->tree, sname2);
diff --git a/source4/torture/raw/unlink.c b/source4/torture/raw/unlink.c
index 4c91ab58ba..398884043e 100644
--- a/source4/torture/raw/unlink.c
+++ b/source4/torture/raw/unlink.c
@@ -39,7 +39,7 @@
*/
static BOOL test_unlink(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
{
- struct smb_unlink io;
+ union smb_unlink io;
NTSTATUS status;
BOOL ret = True;
const char *fname = BASEDIR "\\test.txt";
@@ -49,15 +49,15 @@ static BOOL test_unlink(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
}
printf("Trying non-existant file\n");
- io.in.pattern = fname;
- io.in.attrib = 0;
+ io.unlink.in.pattern = fname;
+ io.unlink.in.attrib = 0;
status = smb_raw_unlink(cli->tree, &io);
CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_NOT_FOUND);
smbcli_close(cli->tree, smbcli_open(cli->tree, fname, O_RDWR|O_CREAT, DENY_NONE));
- io.in.pattern = fname;
- io.in.attrib = 0;
+ io.unlink.in.pattern = fname;
+ io.unlink.in.attrib = 0;
status = smb_raw_unlink(cli->tree, &io);
CHECK_STATUS(status, NT_STATUS_OK);
@@ -65,94 +65,94 @@ static BOOL test_unlink(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
smbcli_close(cli->tree, smbcli_open(cli->tree, fname, O_RDWR|O_CREAT, DENY_NONE));
torture_set_file_attribute(cli->tree, fname, FILE_ATTRIBUTE_HIDDEN);
- io.in.pattern = fname;
- io.in.attrib = 0;
+ io.unlink.in.pattern = fname;
+ io.unlink.in.attrib = 0;
status = smb_raw_unlink(cli->tree, &io);
CHECK_STATUS(status, NT_STATUS_NO_SUCH_FILE);
- io.in.pattern = fname;
- io.in.attrib = FILE_ATTRIBUTE_HIDDEN;
+ io.unlink.in.pattern = fname;
+ io.unlink.in.attrib = FILE_ATTRIBUTE_HIDDEN;
status = smb_raw_unlink(cli->tree, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- io.in.pattern = fname;
- io.in.attrib = FILE_ATTRIBUTE_HIDDEN;
+ io.unlink.in.pattern = fname;
+ io.unlink.in.attrib = FILE_ATTRIBUTE_HIDDEN;
status = smb_raw_unlink(cli->tree, &io);
CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_NOT_FOUND);
printf("Trying a directory\n");
- io.in.pattern = BASEDIR;
- io.in.attrib = 0;
+ io.unlink.in.pattern = BASEDIR;
+ io.unlink.in.attrib = 0;
status = smb_raw_unlink(cli->tree, &io);
CHECK_STATUS(status, NT_STATUS_FILE_IS_A_DIRECTORY);
- io.in.pattern = BASEDIR;
- io.in.attrib = FILE_ATTRIBUTE_DIRECTORY;
+ io.unlink.in.pattern = BASEDIR;
+ io.unlink.in.attrib = FILE_ATTRIBUTE_DIRECTORY;
status = smb_raw_unlink(cli->tree, &io);
CHECK_STATUS(status, NT_STATUS_FILE_IS_A_DIRECTORY);
printf("Trying a bad path\n");
- io.in.pattern = "..";
- io.in.attrib = 0;
+ io.unlink.in.pattern = "..";
+ io.unlink.in.attrib = 0;
status = smb_raw_unlink(cli->tree, &io);
CHECK_STATUS(status, NT_STATUS_OBJECT_PATH_SYNTAX_BAD);
- io.in.pattern = "\\..";
- io.in.attrib = 0;
+ io.unlink.in.pattern = "\\..";
+ io.unlink.in.attrib = 0;
status = smb_raw_unlink(cli->tree, &io);
CHECK_STATUS(status, NT_STATUS_OBJECT_PATH_SYNTAX_BAD);
- io.in.pattern = BASEDIR "\\..\\..";
- io.in.attrib = 0;
+ io.unlink.in.pattern = BASEDIR "\\..\\..";
+ io.unlink.in.attrib = 0;
status = smb_raw_unlink(cli->tree, &io);
CHECK_STATUS(status, NT_STATUS_OBJECT_PATH_SYNTAX_BAD);
- io.in.pattern = BASEDIR "\\..";
- io.in.attrib = 0;
+ io.unlink.in.pattern = BASEDIR "\\..";
+ io.unlink.in.attrib = 0;
status = smb_raw_unlink(cli->tree, &io);
CHECK_STATUS(status, NT_STATUS_FILE_IS_A_DIRECTORY);
printf("Trying wildcards\n");
smbcli_close(cli->tree, smbcli_open(cli->tree, fname, O_RDWR|O_CREAT, DENY_NONE));
- io.in.pattern = BASEDIR "\\t*.t";
- io.in.attrib = 0;
+ io.unlink.in.pattern = BASEDIR "\\t*.t";
+ io.unlink.in.attrib = 0;
status = smb_raw_unlink(cli->tree, &io);
CHECK_STATUS(status, NT_STATUS_NO_SUCH_FILE);
- io.in.pattern = BASEDIR "\\z*";
- io.in.attrib = 0;
+ io.unlink.in.pattern = BASEDIR "\\z*";
+ io.unlink.in.attrib = 0;
status = smb_raw_unlink(cli->tree, &io);
CHECK_STATUS(status, NT_STATUS_NO_SUCH_FILE);
- io.in.pattern = BASEDIR "\\z*";
- io.in.attrib = FILE_ATTRIBUTE_DIRECTORY;
+ io.unlink.in.pattern = BASEDIR "\\z*";
+ io.unlink.in.attrib = FILE_ATTRIBUTE_DIRECTORY;
status = smb_raw_unlink(cli->tree, &io);
CHECK_STATUS(status, NT_STATUS_NO_SUCH_FILE);
- io.in.pattern = BASEDIR "\\*";
- io.in.attrib = FILE_ATTRIBUTE_DIRECTORY;
+ io.unlink.in.pattern = BASEDIR "\\*";
+ io.unlink.in.attrib = FILE_ATTRIBUTE_DIRECTORY;
status = smb_raw_unlink(cli->tree, &io);
CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_INVALID);
- io.in.pattern = BASEDIR "\\?";
- io.in.attrib = FILE_ATTRIBUTE_DIRECTORY;
+ io.unlink.in.pattern = BASEDIR "\\?";
+ io.unlink.in.attrib = FILE_ATTRIBUTE_DIRECTORY;
status = smb_raw_unlink(cli->tree, &io);
CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_INVALID);
- io.in.pattern = BASEDIR "\\t*";
- io.in.attrib = FILE_ATTRIBUTE_DIRECTORY;
+ io.unlink.in.pattern = BASEDIR "\\t*";
+ io.unlink.in.attrib = FILE_ATTRIBUTE_DIRECTORY;
status = smb_raw_unlink(cli->tree, &io);
CHECK_STATUS(status, NT_STATUS_OK);
smbcli_close(cli->tree, smbcli_open(cli->tree, fname, O_RDWR|O_CREAT, DENY_NONE));
- io.in.pattern = BASEDIR "\\*.dat";
- io.in.attrib = FILE_ATTRIBUTE_DIRECTORY;
+ io.unlink.in.pattern = BASEDIR "\\*.dat";
+ io.unlink.in.attrib = FILE_ATTRIBUTE_DIRECTORY;
status = smb_raw_unlink(cli->tree, &io);
CHECK_STATUS(status, NT_STATUS_NO_SUCH_FILE);
- io.in.pattern = BASEDIR "\\*.tx?";
- io.in.attrib = 0;
+ io.unlink.in.pattern = BASEDIR "\\*.tx?";
+ io.unlink.in.attrib = 0;
status = smb_raw_unlink(cli->tree, &io);
CHECK_STATUS(status, NT_STATUS_OK);
@@ -173,7 +173,7 @@ done:
static BOOL test_delete_on_close(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
{
union smb_open op;
- struct smb_unlink io;
+ union smb_unlink io;
struct smb_rmdir dio;
NTSTATUS status;
BOOL ret = True;
@@ -189,8 +189,8 @@ static BOOL test_delete_on_close(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
dio.in.path = dname;
- io.in.pattern = fname;
- io.in.attrib = 0;
+ io.unlink.in.pattern = fname;
+ io.unlink.in.attrib = 0;
status = smb_raw_unlink(cli->tree, &io);
CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_NOT_FOUND);
@@ -303,7 +303,7 @@ static BOOL test_delete_on_close(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
status = smb_raw_open(cli->tree, mem_ctx, &op);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = op.ntcreatex.out.fnum;
+ fnum = op.ntcreatex.file.fnum;
smbcli_close(cli->tree, fnum);
@@ -335,7 +335,7 @@ static BOOL test_delete_on_close(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
status = smb_raw_open(cli->tree, mem_ctx, &op);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum2 = op.ntcreatex.out.fnum;
+ fnum2 = op.ntcreatex.file.fnum;
smbcli_close(cli->tree, fnum2);
@@ -370,13 +370,13 @@ static BOOL test_delete_on_close(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
status = smb_raw_open(cli->tree, mem_ctx, &op);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = op.ntcreatex.out.fnum;
+ fnum = op.ntcreatex.file.fnum;
/* open without delete on close */
op.ntcreatex.in.create_options = NTCREATEX_OPTIONS_DIRECTORY;
status = smb_raw_open(cli->tree, mem_ctx, &op);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum2 = op.ntcreatex.out.fnum;
+ fnum2 = op.ntcreatex.file.fnum;
/* close 2nd file handle */
smbcli_close(cli->tree, fnum2);
diff --git a/source4/torture/raw/write.c b/source4/torture/raw/write.c
index 4209d66892..e9a391a7dc 100644
--- a/source4/torture/raw/write.c
+++ b/source4/torture/raw/write.c
@@ -50,7 +50,7 @@
#define CHECK_ALL_INFO(v, field) do { \
finfo.all_info.level = RAW_FILEINFO_ALL_INFO; \
- finfo.all_info.in.fname = fname; \
+ finfo.all_info.file.path = fname; \
status = smb_raw_pathinfo(cli->tree, mem_ctx, &finfo); \
CHECK_STATUS(status, NT_STATUS_OK); \
if ((v) != finfo.all_info.out.field) { \
@@ -124,7 +124,7 @@ static BOOL test_write(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
}
printf("Trying zero write\n");
- io.write.in.fnum = fnum;
+ io.write.file.fnum = fnum;
io.write.in.count = 0;
io.write.in.offset = 0;
io.write.in.remaining = 0;
@@ -171,7 +171,7 @@ static BOOL test_write(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
CHECK_BUFFER(buf, seed, 4000);
printf("Trying bad fnum\n");
- io.write.in.fnum = fnum+1;
+ io.write.file.fnum = fnum+1;
io.write.in.count = 4000;
io.write.in.offset = 0;
io.write.in.data = buf;
@@ -184,7 +184,7 @@ static BOOL test_write(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
printf("Trying 2^32 offset\n");
setup_buffer(buf, seed, maxsize);
- io.write.in.fnum = fnum;
+ io.write.file.fnum = fnum;
io.write.in.count = 4000;
io.write.in.offset = 0xFFFFFFFF - 2000;
io.write.in.data = buf;
@@ -241,7 +241,7 @@ static BOOL test_writex(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
}
printf("Trying zero write\n");
- io.writex.in.fnum = fnum;
+ io.writex.file.fnum = fnum;
io.writex.in.offset = 0;
io.writex.in.wmode = 0;
io.writex.in.remaining = 0;
@@ -289,7 +289,7 @@ static BOOL test_writex(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
CHECK_BUFFER(buf, seed, 4000);
printf("Trying bad fnum\n");
- io.writex.in.fnum = fnum+1;
+ io.writex.file.fnum = fnum+1;
io.writex.in.count = 4000;
io.writex.in.offset = 0;
io.writex.in.data = buf;
@@ -297,7 +297,7 @@ static BOOL test_writex(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
CHECK_STATUS(status, NT_STATUS_INVALID_HANDLE);
printf("Testing wmode\n");
- io.writex.in.fnum = fnum;
+ io.writex.file.fnum = fnum;
io.writex.in.count = 1;
io.writex.in.offset = 0;
io.writex.in.wmode = 1;
@@ -332,7 +332,7 @@ static BOOL test_writex(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
printf("Trying 2^32 offset\n");
setup_buffer(buf, seed, maxsize);
- io.writex.in.fnum = fnum;
+ io.writex.file.fnum = fnum;
io.writex.in.count = 4000;
io.writex.in.offset = 0xFFFFFFFF - 2000;
io.writex.in.data = buf;
@@ -352,7 +352,7 @@ static BOOL test_writex(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
for (i=33;i<64;i++) {
printf("Trying 2^%d offset\n", i);
setup_buffer(buf, seed+1, maxsize);
- io.writex.in.fnum = fnum;
+ io.writex.file.fnum = fnum;
io.writex.in.count = 4000;
io.writex.in.offset = ((uint64_t)1) << i;
io.writex.in.data = buf;
@@ -417,7 +417,7 @@ static BOOL test_writeunlock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
}
printf("Trying zero write\n");
- io.writeunlock.in.fnum = fnum;
+ io.writeunlock.file.fnum = fnum;
io.writeunlock.in.count = 0;
io.writeunlock.in.offset = 0;
io.writeunlock.in.remaining = 0;
@@ -482,7 +482,7 @@ static BOOL test_writeunlock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
CHECK_BUFFER(buf, seed, 4000);
printf("Trying bad fnum\n");
- io.writeunlock.in.fnum = fnum+1;
+ io.writeunlock.file.fnum = fnum+1;
io.writeunlock.in.count = 4000;
io.writeunlock.in.offset = 0;
io.writeunlock.in.data = buf;
@@ -495,7 +495,7 @@ static BOOL test_writeunlock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
printf("Trying 2^32 offset\n");
setup_buffer(buf, seed, maxsize);
- io.writeunlock.in.fnum = fnum;
+ io.writeunlock.file.fnum = fnum;
io.writeunlock.in.count = 4000;
io.writeunlock.in.offset = 0xFFFFFFFF - 2000;
io.writeunlock.in.data = buf;
@@ -554,7 +554,7 @@ static BOOL test_writeclose(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
}
printf("Trying zero write\n");
- io.writeclose.in.fnum = fnum;
+ io.writeclose.file.fnum = fnum;
io.writeclose.in.count = 0;
io.writeclose.in.offset = 0;
io.writeclose.in.mtime = 0;
@@ -580,7 +580,7 @@ static BOOL test_writeclose(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
CHECK_STATUS(status, NT_STATUS_INVALID_HANDLE);
fnum = smbcli_open(cli->tree, fname, O_RDWR, DENY_NONE);
- io.writeclose.in.fnum = fnum;
+ io.writeclose.file.fnum = fnum;
if (smbcli_read(cli->tree, fnum, buf, 0, 13) != 13) {
printf("read failed at %s\n", __location__);
@@ -596,7 +596,7 @@ static BOOL test_writeclose(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
CHECK_VALUE(io.writeclose.out.nwritten, io.writeclose.in.count);
fnum = smbcli_open(cli->tree, fname, O_RDWR, DENY_NONE);
- io.writeclose.in.fnum = fnum;
+ io.writeclose.file.fnum = fnum;
memset(buf, 0, maxsize);
if (smbcli_read(cli->tree, fnum, buf, 0, 13) != 13) {
@@ -621,7 +621,7 @@ static BOOL test_writeclose(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
CHECK_STATUS(status, NT_STATUS_INVALID_HANDLE);
fnum = smbcli_open(cli->tree, fname, O_RDWR, DENY_NONE);
- io.writeclose.in.fnum = fnum;
+ io.writeclose.file.fnum = fnum;
memset(buf, 0, maxsize);
if (smbcli_read(cli->tree, fnum, buf, 0, 4000) != 4000) {
@@ -632,7 +632,7 @@ static BOOL test_writeclose(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
CHECK_BUFFER(buf, seed, 4000);
printf("Trying bad fnum\n");
- io.writeclose.in.fnum = fnum+1;
+ io.writeclose.file.fnum = fnum+1;
io.writeclose.in.count = 4000;
io.writeclose.in.offset = 0;
io.writeclose.in.data = buf;
@@ -645,7 +645,7 @@ static BOOL test_writeclose(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
printf("Trying 2^32 offset\n");
setup_buffer(buf, seed, maxsize);
- io.writeclose.in.fnum = fnum;
+ io.writeclose.file.fnum = fnum;
io.writeclose.in.count = 4000;
io.writeclose.in.offset = 0xFFFFFFFF - 2000;
io.writeclose.in.data = buf;
@@ -655,7 +655,7 @@ static BOOL test_writeclose(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
CHECK_ALL_INFO(io.writeclose.in.count + (uint64_t)io.writeclose.in.offset, size);
fnum = smbcli_open(cli->tree, fname, O_RDWR, DENY_NONE);
- io.writeclose.in.fnum = fnum;
+ io.writeclose.file.fnum = fnum;
memset(buf, 0, maxsize);
if (smbcli_read(cli->tree, fnum, buf, io.writeclose.in.offset, 4000) != 4000) {
diff --git a/source4/torture/smb2/find.c b/source4/torture/smb2/find.c
index 07c3f865e2..2e1c9f8814 100644
--- a/source4/torture/smb2/find.c
+++ b/source4/torture/smb2/find.c
@@ -100,7 +100,7 @@ static BOOL torture_smb2_find_levels(struct smb2_tree *tree)
}
io.generic.level = RAW_FILEINFO_ALT_NAME_INFORMATION;
- io.generic.in.handle = handle;
+ io.generic.file.handle = handle;
status = smb2_getinfo_file(tree, tree, &io);
if (!NT_STATUS_IS_OK(status)) {
return False;
@@ -108,7 +108,7 @@ static BOOL torture_smb2_find_levels(struct smb2_tree *tree)
alt_name = talloc_strdup(tree, io.alt_name_info.out.fname.s);
io.generic.level = RAW_FILEINFO_SMB2_ALL_INFORMATION;
- io.generic.in.handle = handle;
+ io.generic.file.handle = handle;
status = smb2_getinfo_file(tree, tree, &io);
if (!NT_STATUS_IS_OK(status)) {
return False;
diff --git a/source4/torture/smb2/getinfo.c b/source4/torture/smb2/getinfo.c
index 2e3d2f2fac..450c51be76 100644
--- a/source4/torture/smb2/getinfo.c
+++ b/source4/torture/smb2/getinfo.c
@@ -99,23 +99,23 @@ static BOOL torture_smb2_fileinfo(struct smb2_tree *tree)
for (i=0;i<ARRAY_SIZE(file_levels);i++) {
if (file_levels[i].level == RAW_FILEINFO_SEC_DESC) {
- file_levels[i].finfo.query_secdesc.secinfo_flags = 0x7;
- file_levels[i].dinfo.query_secdesc.secinfo_flags = 0x7;
+ file_levels[i].finfo.query_secdesc.in.secinfo_flags = 0x7;
+ file_levels[i].dinfo.query_secdesc.in.secinfo_flags = 0x7;
}
if (file_levels[i].level == RAW_FILEINFO_SMB2_ALL_EAS) {
- file_levels[i].finfo.all_eas.continue_flags =
+ file_levels[i].finfo.all_eas.in.continue_flags =
SMB2_CONTINUE_FLAG_RESTART;
- file_levels[i].dinfo.all_eas.continue_flags =
+ file_levels[i].dinfo.all_eas.in.continue_flags =
SMB2_CONTINUE_FLAG_RESTART;
}
file_levels[i].finfo.generic.level = file_levels[i].level;
- file_levels[i].finfo.generic.in.handle = hfile;
+ file_levels[i].finfo.generic.file.handle = hfile;
file_levels[i].fstatus = smb2_getinfo_file(tree, tree, &file_levels[i].finfo);
if (!NT_STATUS_IS_OK(file_levels[i].fstatus)) {
printf("%s failed on file - %s\n", file_levels[i].name, nt_errstr(file_levels[i].fstatus));
}
file_levels[i].dinfo.generic.level = file_levels[i].level;
- file_levels[i].dinfo.generic.in.handle = hdir;
+ file_levels[i].dinfo.generic.file.handle = hdir;
file_levels[i].dstatus = smb2_getinfo_file(tree, tree, &file_levels[i].dinfo);
if (!NT_STATUS_IS_OK(file_levels[i].dstatus)) {
printf("%s failed on dir - %s\n", file_levels[i].name, nt_errstr(file_levels[i].dstatus));
diff --git a/source4/torture/smb2/setinfo.c b/source4/torture/smb2/setinfo.c
index 562493b047..bf8c8dad01 100644
--- a/source4/torture/smb2/setinfo.c
+++ b/source4/torture/smb2/setinfo.c
@@ -88,7 +88,7 @@ BOOL torture_smb2_setinfo(void)
#define CHECK1(call) \
do { if (NT_STATUS_IS_OK(status)) { \
finfo2.generic.level = RAW_FILEINFO_ ## call; \
- finfo2.generic.in.handle = handle; \
+ finfo2.generic.file.handle = handle; \
status2 = smb2_getinfo_file(tree, mem_ctx, &finfo2); \
if (!NT_STATUS_IS_OK(status2)) { \
printf("%s - %s\n", #call, nt_errstr(status2)); \
diff --git a/source4/torture/smb2/util.c b/source4/torture/smb2/util.c
index 953ef448d9..9be9b07c5b 100644
--- a/source4/torture/smb2/util.c
+++ b/source4/torture/smb2/util.c
@@ -159,7 +159,7 @@ static NTSTATUS smb2_create_complex(struct smb2_tree *tree, const char *fname,
/* make sure all the timestamps aren't the same */
fileinfo.generic.level = RAW_FILEINFO_BASIC_INFORMATION;
- fileinfo.generic.in.handle = *handle;
+ fileinfo.generic.file.handle = *handle;
status = smb2_getinfo_file(tree, tree, &fileinfo);
if (!NT_STATUS_IS_OK(status)) {
@@ -207,7 +207,7 @@ void torture_smb2_all_info(struct smb2_tree *tree, struct smb2_handle handle)
union smb_fileinfo io;
io.generic.level = RAW_FILEINFO_SMB2_ALL_INFORMATION;
- io.generic.in.handle = handle;
+ io.generic.file.handle = handle;
status = smb2_getinfo_file(tree, tmp_ctx, &io);
if (!NT_STATUS_IS_OK(status)) {
@@ -272,7 +272,7 @@ void torture_smb2_all_info(struct smb2_tree *tree, struct smb2_handle handle)
if (DEBUGLVL(1)) {
/* the security descriptor */
io.query_secdesc.level = RAW_FILEINFO_SEC_DESC;
- io.query_secdesc.secinfo_flags =
+ io.query_secdesc.in.secinfo_flags =
SECINFO_OWNER|SECINFO_GROUP|
SECINFO_DACL;
status = smb2_getinfo_file(tree, tmp_ctx, &io);
diff --git a/source4/torture/torture.c b/source4/torture/torture.c
index 9955c9e958..9598e1ea2e 100644
--- a/source4/torture/torture.c
+++ b/source4/torture/torture.c
@@ -1922,7 +1922,7 @@ BOOL torture_ioctl_test(void)
}
parms.ioctl.level = RAW_IOCTL_IOCTL;
- parms.ioctl.in.fnum = fnum;
+ parms.ioctl.file.fnum = fnum;
parms.ioctl.in.request = IOCTL_QUERY_JOB_INFO;
status = smb_raw_ioctl(cli->tree, mem_ctx, &parms);
printf("ioctl job info: %s\n", smbcli_errstr(cli->tree));
diff --git a/source4/torture/torture_util.c b/source4/torture/torture_util.c
index fefbfcf568..bf227f4e9f 100644
--- a/source4/torture/torture_util.c
+++ b/source4/torture/torture_util.c
@@ -67,7 +67,7 @@ NTSTATUS create_directory_handle(struct smbcli_tree *tree, const char *dname, in
talloc_free(mem_ctx);
if (NT_STATUS_IS_OK(status)) {
- *fnum = io.ntcreatex.out.fnum;
+ *fnum = io.ntcreatex.file.fnum;
}
return status;
@@ -134,7 +134,7 @@ int create_complex_file(struct smbcli_state *cli, TALLOC_CTX *mem_ctx, const cha
/* make sure all the timestamps aren't the same */
fileinfo.generic.level = RAW_FILEINFO_GETATTRE;
- fileinfo.generic.in.fnum = fnum;
+ fileinfo.generic.file.fnum = fnum;
status = smb_raw_fileinfo(cli->tree, mem_ctx, &fileinfo);
if (!NT_STATUS_IS_OK(status)) {
@@ -211,7 +211,7 @@ int create_complex_dir(struct smbcli_state *cli, TALLOC_CTX *mem_ctx, const char
/* make sure all the timestamps aren't the same */
fileinfo.generic.level = RAW_FILEINFO_GETATTRE;
- fileinfo.generic.in.fnum = fnum;
+ fileinfo.generic.file.fnum = fnum;
status = smb_raw_fileinfo(cli->tree, mem_ctx, &fileinfo);
if (!NT_STATUS_IS_OK(status)) {
@@ -337,7 +337,7 @@ void torture_all_info(struct smbcli_tree *tree, const char *fname)
NTSTATUS status;
finfo.generic.level = RAW_FILEINFO_ALL_INFO;
- finfo.generic.in.fname = fname;
+ finfo.generic.file.path = fname;
status = smb_raw_pathinfo(tree, mem_ctx, &finfo);
if (!NT_STATUS_IS_OK(status)) {
d_printf("%s - %s\n", fname, nt_errstr(status));
@@ -379,7 +379,7 @@ BOOL torture_set_file_attribute(struct smbcli_tree *tree, const char *fname, uin
NTSTATUS status;
sfinfo.generic.level = RAW_SFILEINFO_BASIC_INFORMATION;
- sfinfo.generic.file.fname = fname;
+ sfinfo.generic.file.path = fname;
ZERO_STRUCT(sfinfo.basic_info.in);
sfinfo.basic_info.in.attrib = attrib;
@@ -404,7 +404,7 @@ NTSTATUS torture_set_sparse(struct smbcli_tree *tree, int fnum)
nt.ntioctl.level = RAW_IOCTL_NTIOCTL;
nt.ntioctl.in.function = 0x900c4;
- nt.ntioctl.in.fnum = fnum;
+ nt.ntioctl.file.fnum = fnum;
nt.ntioctl.in.fsctl = True;
nt.ntioctl.in.filter = 0;
@@ -427,7 +427,7 @@ NTSTATUS torture_check_ea(struct smbcli_state *cli,
TALLOC_CTX *mem_ctx = talloc_new(cli);
info.ea_list.level = RAW_FILEINFO_EA_LIST;
- info.ea_list.file.fname = fname;
+ info.ea_list.file.path = fname;
info.ea_list.in.num_names = 1;
info.ea_list.in.ea_names = &ea;