summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-03-12 22:48:25 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:57:06 -0500
commita1b295ed4823ce8d06f830b8db9a5d965c934b54 (patch)
tree2de735a28634c011930456f6591072a3c1471263 /source4
parent33647bd841c1c74e7dc50e93379e372056ac2df1 (diff)
downloadsamba-a1b295ed4823ce8d06f830b8db9a5d965c934b54.tar.gz
samba-a1b295ed4823ce8d06f830b8db9a5d965c934b54.tar.bz2
samba-a1b295ed4823ce8d06f830b8db9a5d965c934b54.zip
r14256: - rename smb_file -> smb_handle
- move it into the in/out substructs again - allow file.path only on smb_fileinfo/smb_setfileinfo metze (This used to be commit be6d5298a2cdb7e7c61d70471bad445645af5963)
Diffstat (limited to 'source4')
-rw-r--r--source4/client/cifsddio.c40
-rw-r--r--source4/client/client.c6
-rw-r--r--source4/libcli/clifile.c32
-rw-r--r--source4/libcli/clireadwrite.c6
-rw-r--r--source4/libcli/clitrans2.c10
-rw-r--r--source4/libcli/raw/interfaces.h291
-rw-r--r--source4/libcli/raw/rawacl.c4
-rw-r--r--source4/libcli/raw/rawfile.c34
-rw-r--r--source4/libcli/raw/rawfileinfo.c8
-rw-r--r--source4/libcli/raw/rawioctl.c4
-rw-r--r--source4/libcli/raw/rawnotify.c2
-rw-r--r--source4/libcli/raw/rawreadwrite.c18
-rw-r--r--source4/libcli/raw/rawsetfileinfo.c8
-rw-r--r--source4/libcli/smb2/getinfo.c2
-rw-r--r--source4/libcli/smb2/setinfo.c2
-rw-r--r--source4/libcli/smb_composite/appendacl.c8
-rw-r--r--source4/libcli/smb_composite/loadfile.c8
-rw-r--r--source4/libcli/smb_composite/savefile.c8
-rw-r--r--source4/librpc/rpc/dcerpc_smb.c8
-rw-r--r--source4/ntvfs/ipc/vfs_ipc.c14
-rw-r--r--source4/ntvfs/nbench/vfs_nbench.c24
-rw-r--r--source4/ntvfs/ntvfs_generic.c68
-rw-r--r--source4/ntvfs/posix/pvfs_flush.c4
-rw-r--r--source4/ntvfs/posix/pvfs_ioctl.c2
-rw-r--r--source4/ntvfs/posix/pvfs_lock.c4
-rw-r--r--source4/ntvfs/posix/pvfs_open.c12
-rw-r--r--source4/ntvfs/posix/pvfs_qfileinfo.c4
-rw-r--r--source4/ntvfs/posix/pvfs_read.c2
-rw-r--r--source4/ntvfs/posix/pvfs_seek.c2
-rw-r--r--source4/ntvfs/posix/pvfs_setfileinfo.c19
-rw-r--r--source4/ntvfs/posix/pvfs_write.c2
-rw-r--r--source4/ntvfs/simple/vfs_simple.c24
-rw-r--r--source4/smb_server/smb/nttrans.c10
-rw-r--r--source4/smb_server/smb/reply.c82
-rw-r--r--source4/smb_server/smb/trans2.c14
-rw-r--r--source4/torture/basic/delaywrite.c24
-rw-r--r--source4/torture/basic/delete.c4
-rw-r--r--source4/torture/basic/denytest.c30
-rw-r--r--source4/torture/basic/disconnect.c2
-rw-r--r--source4/torture/gentest.c46
-rw-r--r--source4/torture/nbench/nbio.c22
-rw-r--r--source4/torture/raw/acls.c120
-rw-r--r--source4/torture/raw/close.c20
-rw-r--r--source4/torture/raw/context.c18
-rw-r--r--source4/torture/raw/eas.c12
-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.c12
-rw-r--r--source4/torture/raw/open.c98
-rw-r--r--source4/torture/raw/oplock.c40
-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.c14
-rw-r--r--source4/torture/raw/seek.c38
-rw-r--r--source4/torture/raw/setfileinfo.c20
-rw-r--r--source4/torture/raw/streams.c10
-rw-r--r--source4/torture/raw/unlink.c22
-rw-r--r--source4/torture/raw/write.c38
-rw-r--r--source4/torture/smb2/find.c4
-rw-r--r--source4/torture/smb2/getinfo.c4
-rw-r--r--source4/torture/smb2/setinfo.c4
-rw-r--r--source4/torture/smb2/util.c6
-rw-r--r--source4/torture/torture.c2
-rw-r--r--source4/torture/torture_util.c22
66 files changed, 775 insertions, 745 deletions
diff --git a/source4/client/cifsddio.c b/source4/client/cifsddio.c
index c66cb5eeee..05e98f60bb 100644
--- a/source4/client/cifsddio.c
+++ b/source4/client/cifsddio.c
@@ -140,7 +140,7 @@ static struct dd_iohandle * open_fd_handle(const char * path,
/* CIFS client IO. */
/* ------------------------------------------------------------------------- */
-struct smb_handle
+struct cifs_handle
{
struct dd_iohandle h;
struct smbcli_state * cli;
@@ -148,7 +148,7 @@ struct smb_handle
uint64_t offset;
};
-#define IO_HANDLE_TO_SMB(h) ((struct smb_handle *)(h))
+#define IO_HANDLE_TO_SMB(h) ((struct cifs_handle *)(h))
BOOL smb_seek_func(void * handle, uint64_t offset)
{
@@ -163,17 +163,17 @@ BOOL smb_read_func(void * handle,
{
NTSTATUS ret;
union smb_read r;
- struct smb_handle * smbh;
+ struct cifs_handle * smbh;
ZERO_STRUCT(r);
smbh = IO_HANDLE_TO_SMB(handle);
- r.generic.level = RAW_READ_READX;
- r.readx.file.fnum = smbh->fnum;
- r.readx.in.offset = smbh->offset;
- r.readx.in.mincnt = wanted;
- r.readx.in.maxcnt = wanted;
- r.readx.out.data = buf;
+ r.generic.level = RAW_READ_READX;
+ r.readx.in.file.fnum = smbh->fnum;
+ r.readx.in.offset = smbh->offset;
+ r.readx.in.mincnt = wanted;
+ r.readx.in.maxcnt = wanted;
+ r.readx.out.data = buf;
/* FIXME: Should I really set readx.in.remaining? That just seems
* redundant.
@@ -201,16 +201,16 @@ BOOL smb_write_func(void * handle,
{
NTSTATUS ret;
union smb_write w;
- struct smb_handle * smbh;
+ struct cifs_handle * smbh;
ZERO_STRUCT(w);
smbh = IO_HANDLE_TO_SMB(handle);
- w.generic.level = RAW_WRITE_WRITEX;
- w.writex.file.fnum = smbh->fnum;
- w.writex.in.offset = smbh->offset;
- w.writex.in.count = wanted;
- w.writex.in.data = buf;
+ w.generic.level = RAW_WRITE_WRITEX;
+ w.writex.in.file.fnum = smbh->fnum;
+ w.writex.in.offset = smbh->offset;
+ w.writex.in.count = wanted;
+ w.writex.in.data = buf;
ret = smb_raw_write(smbh->cli->tree, &w);
if (!NT_STATUS_IS_OK(ret)) {
@@ -290,16 +290,16 @@ static int open_smb_file(struct smbcli_state * cli,
return(-1);
}
- return(o.ntcreatex.file.fnum);
+ return(o.ntcreatex.out.file.fnum);
}
-static struct dd_iohandle * open_smb_handle(const char * host,
+static struct dd_iohandle * open_cifs_handle(const char * host,
const char * share,
const char * path,
uint64_t io_size,
int options)
{
- struct smb_handle * smbh;
+ struct cifs_handle * smbh;
if (path == NULL || *path == '\0') {
fprintf(stderr, "%s: missing path name within share //%s/%s\n",
@@ -309,7 +309,7 @@ static struct dd_iohandle * open_smb_handle(const char * host,
DEBUG(4, ("opening SMB stream to //%s/%s for %s\n",
host, share, path));
- if ((smbh = talloc_zero(NULL, struct smb_handle)) == NULL) {
+ if ((smbh = talloc_zero(NULL, struct cifs_handle)) == NULL) {
return(NULL);
}
@@ -349,7 +349,7 @@ struct dd_iohandle * dd_open_path(const char * path,
/* Skip over leading directory separators. */
while (*remain == '/' || *remain == '\\') { remain++; }
- return(open_smb_handle(host, share, remain,
+ return(open_cifs_handle(host, share, remain,
io_size, options));
}
diff --git a/source4/client/client.c b/source4/client/client.c
index fa3d3e71f6..a9d7f6cd47 100644
--- a/source4/client/client.c
+++ b/source4/client/client.c
@@ -1727,7 +1727,7 @@ static int cmd_allinfo(struct smbclient_context *ctx, const char **args)
/* first a ALL_INFO QPATHINFO */
finfo.generic.level = RAW_FILEINFO_ALL_INFO;
- finfo.generic.file.path = fname;
+ finfo.generic.in.file.path = fname;
status = smb_raw_pathinfo(ctx->cli->tree, ctx, &finfo);
if (!NT_STATUS_IS_OK(status)) {
d_printf("%s - %s\n", fname, nt_errstr(status));
@@ -1822,7 +1822,7 @@ static int cmd_eainfo(struct smbclient_context *ctx, const char **args)
fname = talloc_strdup(ctx, args[1]);
finfo.generic.level = RAW_FILEINFO_ALL_EAS;
- finfo.generic.file.path = fname;
+ finfo.generic.in.file.path = fname;
status = smb_raw_pathinfo(ctx->cli->tree, ctx, &finfo);
if (!NT_STATUS_IS_OK(status)) {
@@ -1877,7 +1877,7 @@ static int cmd_acl(struct smbclient_context *ctx, const char **args)
}
query.query_secdesc.level = RAW_FILEINFO_SEC_DESC;
- query.query_secdesc.file.fnum = fnum;
+ query.query_secdesc.in.file.fnum = fnum;
query.query_secdesc.in.secinfo_flags = 0x7;
status = smb_raw_fileinfo(ctx->cli->tree, ctx, &query);
diff --git a/source4/libcli/clifile.c b/source4/libcli/clifile.c
index d3de0dab77..cc0c14a2e8 100644
--- a/source4/libcli/clifile.c
+++ b/source4/libcli/clifile.c
@@ -38,11 +38,11 @@ static NTSTATUS smbcli_link_internal(struct smbcli_tree *tree,
if (hard_link) {
parms.generic.level = RAW_SFILEINFO_UNIX_HLINK;
- parms.unix_hlink.file.path = fname_src;
+ parms.unix_hlink.in.file.path = fname_src;
parms.unix_hlink.in.link_dest = fname_dst;
} else {
parms.generic.level = RAW_SFILEINFO_UNIX_LINK;
- parms.unix_link.file.path = fname_src;
+ parms.unix_link.in.file.path = fname_src;
parms.unix_link.in.link_dest = fname_dst;
}
@@ -110,7 +110,7 @@ static NTSTATUS smbcli_unix_chmod_chown_internal(struct smbcli_tree *tree,
NTSTATUS status;
parms.generic.level = SMB_SFILEINFO_UNIX_BASIC;
- parms.unix_basic.file.path = fname;
+ parms.unix_basic.in.file.path = fname;
parms.unix_basic.in.uid = uid;
parms.unix_basic.in.gid = gid;
parms.unix_basic.in.mode = mode;
@@ -213,7 +213,7 @@ NTSTATUS smbcli_nt_delete_on_close(struct smbcli_tree *tree, int fnum, BOOL flag
NTSTATUS status;
parms.disposition_info.level = RAW_SFILEINFO_DISPOSITION_INFO;
- parms.disposition_info.file.fnum = fnum;
+ parms.disposition_info.in.file.fnum = fnum;
parms.disposition_info.in.delete_on_close = flag;
status = smb_raw_setfileinfo(tree, &parms);
@@ -256,7 +256,7 @@ int smbcli_nt_create_full(struct smbcli_tree *tree, const char *fname,
talloc_free(mem_ctx);
if (NT_STATUS_IS_OK(status)) {
- return open_parms.ntcreatex.file.fnum;
+ return open_parms.ntcreatex.out.file.fnum;
}
return -1;
@@ -323,7 +323,7 @@ int smbcli_open(struct smbcli_tree *tree, const char *fname, int flags,
talloc_free(mem_ctx);
if (NT_STATUS_IS_OK(status)) {
- return open_parms.openx.file.fnum;
+ return open_parms.openx.out.file.fnum;
}
return -1;
@@ -339,7 +339,7 @@ NTSTATUS smbcli_close(struct smbcli_tree *tree, int fnum)
NTSTATUS status;
close_parms.close.level = RAW_CLOSE_CLOSE;
- close_parms.close.file.fnum = fnum;
+ close_parms.close.in.file.fnum = fnum;
close_parms.close.in.write_time = 0;
status = smb_raw_close(tree, &close_parms);
return status;
@@ -358,7 +358,7 @@ NTSTATUS smbcli_locktype(struct smbcli_tree *tree, int fnum,
NTSTATUS status;
parms.lockx.level = RAW_LOCK_LOCKX;
- parms.lockx.file.fnum = fnum;
+ parms.lockx.in.file.fnum = fnum;
parms.lockx.in.mode = locktype;
parms.lockx.in.timeout = timeout;
parms.lockx.in.ulock_cnt = 0;
@@ -386,7 +386,7 @@ NTSTATUS smbcli_lock(struct smbcli_tree *tree, int fnum,
NTSTATUS status;
parms.lockx.level = RAW_LOCK_LOCKX;
- parms.lockx.file.fnum = fnum;
+ parms.lockx.in.file.fnum = fnum;
parms.lockx.in.mode = (lock_type == READ_LOCK? 1 : 0);
parms.lockx.in.timeout = timeout;
parms.lockx.in.ulock_cnt = 0;
@@ -412,7 +412,7 @@ NTSTATUS smbcli_unlock(struct smbcli_tree *tree, int fnum, uint32_t offset, uint
NTSTATUS status;
parms.lockx.level = RAW_LOCK_LOCKX;
- parms.lockx.file.fnum = fnum;
+ parms.lockx.in.file.fnum = fnum;
parms.lockx.in.mode = 0;
parms.lockx.in.timeout = 0;
parms.lockx.in.ulock_cnt = 1;
@@ -444,7 +444,7 @@ NTSTATUS smbcli_lock64(struct smbcli_tree *tree, int fnum,
}
parms.lockx.level = RAW_LOCK_LOCKX;
- parms.lockx.file.fnum = fnum;
+ parms.lockx.in.file.fnum = fnum;
ltype = (lock_type == READ_LOCK? 1 : 0);
ltype |= LOCKING_ANDX_LARGE_FILES;
@@ -478,7 +478,7 @@ NTSTATUS smbcli_unlock64(struct smbcli_tree *tree, int fnum, off_t offset,
}
parms.lockx.level = RAW_LOCK_LOCKX;
- parms.lockx.file.fnum = fnum;
+ parms.lockx.in.file.fnum = fnum;
parms.lockx.in.mode = LOCKING_ANDX_LARGE_FILES;
parms.lockx.in.timeout = 0;
parms.lockx.in.ulock_cnt = 1;
@@ -505,7 +505,7 @@ NTSTATUS smbcli_getattrE(struct smbcli_tree *tree, int fnum,
NTSTATUS status;
parms.getattre.level = RAW_FILEINFO_GETATTRE;
- parms.getattre.file.fnum = fnum;
+ parms.getattre.in.file.fnum = fnum;
status = smb_raw_fileinfo(tree, NULL, &parms);
@@ -545,7 +545,7 @@ NTSTATUS smbcli_getatr(struct smbcli_tree *tree, const char *fname,
NTSTATUS status;
parms.getattr.level = RAW_FILEINFO_GETATTR;
- parms.getattr.file.path = fname;
+ parms.getattr.in.file.path = fname;
status = smb_raw_pathinfo(tree, NULL, &parms);
@@ -579,7 +579,7 @@ NTSTATUS smbcli_setatr(struct smbcli_tree *tree, const char *fname, uint16_t mod
NTSTATUS status;
parms.setattr.level = RAW_SFILEINFO_SETATTR;
- parms.setattr.file.path = fname;
+ parms.setattr.in.file.path = fname;
parms.setattr.in.attrib = mode;
parms.setattr.in.write_time = t;
@@ -663,7 +663,7 @@ int smbcli_ctemp(struct smbcli_tree *tree, const char *path, char **tmp_path)
}
talloc_free(mem_ctx);
if (NT_STATUS_IS_OK(status)) {
- return open_parms.ctemp.file.fnum;
+ return open_parms.ctemp.out.file.fnum;
}
return -1;
}
diff --git a/source4/libcli/clireadwrite.c b/source4/libcli/clireadwrite.c
index 03d1864a5d..afffeadeff 100644
--- a/source4/libcli/clireadwrite.c
+++ b/source4/libcli/clireadwrite.c
@@ -38,7 +38,7 @@ ssize_t smbcli_read(struct smbcli_tree *tree, int fnum, void *_buf, off_t offset
}
parms.readx.level = RAW_READ_READX;
- parms.readx.file.fnum = fnum;
+ parms.readx.in.file.fnum = fnum;
/*
* Set readsize to the maximum size we can handle in one readX,
@@ -101,7 +101,7 @@ ssize_t smbcli_write(struct smbcli_tree *tree,
parms.writex.level = RAW_WRITE_WRITEX;
- parms.writex.file.fnum = fnum;
+ parms.writex.in.file.fnum = fnum;
parms.writex.in.wmode = write_mode;
parms.writex.in.remaining = 0;
@@ -145,7 +145,7 @@ ssize_t smbcli_smbwrite(struct smbcli_tree *tree,
size_t size = MIN(size1, tree->session->transport->negotiate.max_xmit - 48);
if (size > 0xFFFF) size = 0xFFFF;
- parms.write.file.fnum = fnum;
+ parms.write.in.file.fnum = fnum;
parms.write.in.offset = offset;
parms.write.in.count = size;
parms.write.in.data = buf + total;
diff --git a/source4/libcli/clitrans2.c b/source4/libcli/clitrans2.c
index f8699e0191..9418c10538 100644
--- a/source4/libcli/clitrans2.c
+++ b/source4/libcli/clitrans2.c
@@ -36,7 +36,7 @@ NTSTATUS smbcli_qpathinfo(struct smbcli_tree *tree, const char *fname,
if (!mem_ctx) return NT_STATUS_NO_MEMORY;
parms.standard.level = RAW_FILEINFO_STANDARD;
- parms.standard.file.path = fname;
+ parms.standard.in.file.path = fname;
status = smb_raw_pathinfo(tree, mem_ctx, &parms);
talloc_free(mem_ctx);
@@ -78,7 +78,7 @@ NTSTATUS smbcli_qpathinfo2(struct smbcli_tree *tree, const char *fname,
if (!mem_ctx) return NT_STATUS_NO_MEMORY;
parms.all_info.level = RAW_FILEINFO_ALL_INFO;
- parms.all_info.file.path = fname;
+ parms.all_info.in.file.path = fname;
status = smb_raw_pathinfo(tree, mem_ctx, &parms);
talloc_free(mem_ctx);
@@ -121,7 +121,7 @@ NTSTATUS smbcli_qfilename(struct smbcli_tree *tree, int fnum, const char **name)
if (!mem_ctx) return NT_STATUS_NO_MEMORY;
parms.name_info.level = RAW_FILEINFO_NAME_INFO;
- parms.name_info.file.fnum = fnum;
+ parms.name_info.in.file.fnum = fnum;
status = smb_raw_fileinfo(tree, mem_ctx, &parms);
if (!NT_STATUS_IS_OK(status)) {
@@ -155,7 +155,7 @@ NTSTATUS smbcli_qfileinfo(struct smbcli_tree *tree, int fnum,
return NT_STATUS_NO_MEMORY;
parms.all_info.level = RAW_FILEINFO_ALL_INFO;
- parms.all_info.file.fnum = fnum;
+ parms.all_info.in.file.fnum = fnum;
status = smb_raw_fileinfo(tree, mem_ctx, &parms);
talloc_free(mem_ctx);
@@ -200,7 +200,7 @@ NTSTATUS smbcli_qpathinfo_alt_name(struct smbcli_tree *tree, const char *fname,
NTSTATUS status;
parms.alt_name_info.level = RAW_FILEINFO_ALT_NAME_INFO;
- parms.alt_name_info.file.path = fname;
+ parms.alt_name_info.in.file.path = fname;
mem_ctx = talloc_init("smbcli_qpathinfo_alt_name");
if (!mem_ctx) return NT_STATUS_NO_MEMORY;
diff --git a/source4/libcli/raw/interfaces.h b/source4/libcli/raw/interfaces.h
index 086686b9e9..20b729caba 100644
--- a/source4/libcli/raw/interfaces.h
+++ b/source4/libcli/raw/interfaces.h
@@ -40,17 +40,46 @@ struct smb_wire_string {
};
/*
- a generic container for file handles
+ * SMB2 uses a 16Byte handle,
+ * (we can maybe use struct GUID later)
+ */
+struct smb2_handle {
+ uint64_t data[2];
+};
+
+/*
+ * a generic container for file handles or file pathes
+ * for qfileinfo/setfileinfo and qpathinfo/setpathinfo
*/
-union smb_file {
+union smb_handle_or_path {
/*
- * this is only used for
+ * this is used for
* the qpathinfo and setpathinfo
* calls
*/
const char *path;
+ /*
+ * this is used as file handle in SMB
+ */
+ uint16_t fnum;
/*
+ * this is used as file handle in SMB2
+ */
+ struct smb2_handle handle;
+};
+
+/*
+ a generic container for file handles
+*/
+union smb_handle {
+ /*
+ * this is used for
+ * the qpathinfo and setpathinfo
+ * calls
+ */
+ const char *path;
+ /*
* this is used as file handle in SMB
*/
uint16_t fnum;
@@ -58,9 +87,7 @@ union smb_file {
/*
* this is used as file handle in SMB2
*/
- struct smb2_handle {
- uint64_t data[2];
- } handle;
+ struct smb2_handle handle;
};
/*
@@ -71,8 +98,8 @@ union smb_file {
/* struct used for SMBlseek call */
union smb_seek {
struct {
- union smb_file file;
struct {
+ union smb_handle file;
uint16_t mode;
int32_t offset; /* signed */
} in;
@@ -343,8 +370,9 @@ union smb_fileinfo {
* matches RAW_FILEINFO_GENERIC */
struct {
enum smb_fileinfo_level level;
- union smb_file file;
-
+ struct {
+ union smb_handle_or_path file;
+ } in;
struct {
uint32_t attrib;
uint32_t ea_size;
@@ -390,8 +418,9 @@ union smb_fileinfo {
* matches RAW_FILEINFO_GETATTR */
struct {
enum smb_fileinfo_level level;
- union smb_file file;
-
+ struct {
+ union smb_handle_or_path file;
+ } in;
struct {
uint16_t attrib;
uint32_t size;
@@ -402,8 +431,9 @@ union smb_fileinfo {
/* SMBgetattrE and RAW_FILEINFO_STANDARD interface */
struct {
enum smb_fileinfo_level level;
- union smb_file file;
-
+ struct {
+ union smb_handle_or_path file;
+ } in;
struct {
time_t create_time;
time_t access_time;
@@ -417,8 +447,9 @@ union smb_fileinfo {
/* trans2 RAW_FILEINFO_EA_SIZE interface */
struct {
enum smb_fileinfo_level level;
- union smb_file file;
-
+ struct {
+ union smb_handle_or_path file;
+ } in;
struct {
time_t create_time;
time_t access_time;
@@ -433,9 +464,8 @@ union smb_fileinfo {
/* trans2 RAW_FILEINFO_EA_LIST interface */
struct {
enum smb_fileinfo_level level;
- union smb_file file;
-
struct {
+ union smb_handle_or_path file;
uint_t num_names;
struct ea_name {
struct smb_wire_string name;
@@ -451,8 +481,8 @@ union smb_fileinfo {
/* trans2 RAW_FILEINFO_ALL_EAS and RAW_FILEINFO_FULL_EA_INFORMATION interfaces */
struct {
enum smb_fileinfo_level level;
- union smb_file file;
struct {
+ union smb_handle_or_path file;
/* SMB2 only - SMB2_CONTINUE_FLAG_* */
uint8_t continue_flags;
} in;
@@ -463,14 +493,17 @@ union smb_fileinfo {
only valid for a QPATHNAME call - no returned data */
struct {
enum smb_fileinfo_level level;
- union smb_file file;
+ struct {
+ union smb_handle_or_path file;
+ } in;
} is_name_valid;
/* RAW_FILEINFO_BASIC_INFO and RAW_FILEINFO_BASIC_INFORMATION interfaces */
struct {
enum smb_fileinfo_level level;
- union smb_file file;
-
+ struct {
+ union smb_handle_or_path file;
+ } in;
struct {
NTTIME create_time;
NTTIME access_time;
@@ -484,8 +517,9 @@ union smb_fileinfo {
/* RAW_FILEINFO_STANDARD_INFO and RAW_FILEINFO_STANDARD_INFORMATION interfaces */
struct {
enum smb_fileinfo_level level;
- union smb_file file;
-
+ struct {
+ union smb_handle_or_path file;
+ } in;
struct {
uint64_t alloc_size;
uint64_t size;
@@ -498,8 +532,9 @@ union smb_fileinfo {
/* RAW_FILEINFO_EA_INFO and RAW_FILEINFO_EA_INFORMATION interfaces */
struct {
enum smb_fileinfo_level level;
- union smb_file file;
-
+ struct {
+ union smb_handle_or_path file;
+ } in;
struct {
uint32_t ea_size;
} out;
@@ -508,8 +543,9 @@ union smb_fileinfo {
/* RAW_FILEINFO_NAME_INFO and RAW_FILEINFO_NAME_INFORMATION interfaces */
struct {
enum smb_fileinfo_level level;
- union smb_file file;
-
+ struct {
+ union smb_handle_or_path file;
+ } in;
struct {
struct smb_wire_string fname;
} out;
@@ -518,8 +554,9 @@ union smb_fileinfo {
/* RAW_FILEINFO_ALL_INFO and RAW_FILEINFO_ALL_INFORMATION interfaces */
struct {
enum smb_fileinfo_level level;
- union smb_file file;
-
+ struct {
+ union smb_handle_or_path file;
+ } in;
struct {
NTTIME create_time;
NTTIME access_time;
@@ -539,8 +576,9 @@ union smb_fileinfo {
/* RAW_FILEINFO_SMB2_ALL_INFORMATION interface */
struct {
enum smb_fileinfo_level level;
- union smb_file file;
-
+ struct {
+ union smb_handle_or_path file;
+ } in;
struct {
NTTIME create_time;
NTTIME access_time;
@@ -561,13 +599,14 @@ union smb_fileinfo {
uint64_t mode;
struct smb_wire_string fname;
} out;
- } all_info2;
+ } all_info2;
/* RAW_FILEINFO_ALT_NAME_INFO and RAW_FILEINFO_ALT_NAME_INFORMATION interfaces */
struct {
enum smb_fileinfo_level level;
- union smb_file file;
-
+ struct {
+ union smb_handle_or_path file;
+ } in;
struct {
struct smb_wire_string fname;
} out;
@@ -576,8 +615,9 @@ union smb_fileinfo {
/* RAW_FILEINFO_STREAM_INFO and RAW_FILEINFO_STREAM_INFORMATION interfaces */
struct {
enum smb_fileinfo_level level;
- union smb_file file;
-
+ struct {
+ union smb_handle_or_path file;
+ } in;
struct stream_information {
uint_t num_streams;
struct stream_struct *streams;
@@ -587,8 +627,9 @@ union smb_fileinfo {
/* RAW_FILEINFO_COMPRESSION_INFO and RAW_FILEINFO_COMPRESSION_INFORMATION interfaces */
struct {
enum smb_fileinfo_level level;
- union smb_file file;
-
+ struct {
+ union smb_handle_or_path file;
+ } in;
struct {
uint64_t compressed_size;
uint16_t format;
@@ -601,8 +642,9 @@ union smb_fileinfo {
/* RAW_FILEINFO_UNIX_BASIC interface */
struct {
enum smb_fileinfo_level level;
- union smb_file file;
-
+ struct {
+ union smb_handle_or_path file;
+ } in;
struct {
uint64_t end_of_file;
uint64_t num_bytes;
@@ -623,8 +665,9 @@ union smb_fileinfo {
/* RAW_FILEINFO_UNIX_LINK interface */
struct {
enum smb_fileinfo_level level;
- union smb_file file;
-
+ struct {
+ union smb_handle_or_path file;
+ } in;
struct {
struct smb_wire_string link_dest;
} out;
@@ -633,8 +676,9 @@ union smb_fileinfo {
/* RAW_FILEINFO_INTERNAL_INFORMATION interface */
struct {
enum smb_fileinfo_level level;
- union smb_file file;
-
+ struct {
+ union smb_handle_or_path file;
+ } in;
struct {
uint64_t file_id;
} out;
@@ -643,8 +687,9 @@ union smb_fileinfo {
/* RAW_FILEINFO_ACCESS_INFORMATION interface */
struct {
enum smb_fileinfo_level level;
- union smb_file file;
-
+ struct {
+ union smb_handle_or_path file;
+ } in;
struct {
uint32_t access_flags;
} out;
@@ -653,8 +698,9 @@ union smb_fileinfo {
/* RAW_FILEINFO_POSITION_INFORMATION interface */
struct {
enum smb_fileinfo_level level;
- union smb_file file;
-
+ struct {
+ union smb_handle_or_path file;
+ } in;
struct {
uint64_t position;
} out;
@@ -663,8 +709,9 @@ union smb_fileinfo {
/* RAW_FILEINFO_MODE_INFORMATION interface */
struct {
enum smb_fileinfo_level level;
- union smb_file file;
-
+ struct {
+ union smb_handle_or_path file;
+ } in;
struct {
uint32_t mode;
} out;
@@ -673,8 +720,9 @@ union smb_fileinfo {
/* RAW_FILEINFO_ALIGNMENT_INFORMATION interface */
struct {
enum smb_fileinfo_level level;
- union smb_file file;
-
+ struct {
+ union smb_handle_or_path file;
+ } in;
struct {
uint32_t alignment_requirement;
} out;
@@ -683,8 +731,9 @@ union smb_fileinfo {
/* RAW_FILEINFO_NETWORK_OPEN_INFORMATION interface */
struct {
enum smb_fileinfo_level level;
- union smb_file file;
-
+ struct {
+ union smb_handle_or_path file;
+ } in;
struct {
NTTIME create_time;
NTTIME access_time;
@@ -700,8 +749,9 @@ union smb_fileinfo {
/* RAW_FILEINFO_ATTRIBUTE_TAG_INFORMATION interface */
struct {
enum smb_fileinfo_level level;
- union smb_file file;
-
+ struct {
+ union smb_handle_or_path file;
+ } in;
struct {
uint32_t attrib;
uint32_t reparse_tag;
@@ -711,8 +761,8 @@ union smb_fileinfo {
/* RAW_FILEINFO_SEC_DESC */
struct {
enum smb_fileinfo_level level;
- union smb_file file;
struct {
+ union smb_handle_or_path file;
uint32_t secinfo_flags;
} in;
struct {
@@ -756,15 +806,16 @@ union smb_setfileinfo {
/* generic interface */
struct {
enum smb_setfileinfo_level level;
-
- union smb_file file;
+ struct {
+ union smb_handle_or_path file;
+ } in;
} generic;
/* RAW_SFILEINFO_SETATTR (SMBsetatr) interface - only via setpathinfo() */
struct {
enum smb_setfileinfo_level level;
- union smb_file file;
struct {
+ union smb_handle_or_path file;
uint16_t attrib;
time_t write_time;
} in;
@@ -774,8 +825,8 @@ union smb_setfileinfo {
also RAW_SFILEINFO_STANDARD */
struct {
enum smb_setfileinfo_level level;
- union smb_file file;
struct {
+ union smb_handle_or_path file;
time_t create_time;
time_t access_time;
time_t write_time;
@@ -787,8 +838,8 @@ union smb_setfileinfo {
/* RAW_SFILEINFO_EA_SET interface */
struct {
enum smb_setfileinfo_level level;
- union smb_file file;
struct {
+ union smb_handle_or_path file;
uint_t num_eas;
struct ea_struct *eas;
} in;
@@ -798,8 +849,8 @@ union smb_setfileinfo {
RAW_SFILEINFO_BASIC_INFORMATION interfaces */
struct {
enum smb_setfileinfo_level level;
- union smb_file file;
struct {
+ union smb_handle_or_path file;
NTTIME create_time;
NTTIME access_time;
NTTIME write_time;
@@ -812,8 +863,8 @@ union smb_setfileinfo {
RAW_SFILEINFO_DISPOSITION_INFORMATION interfaces */
struct {
enum smb_setfileinfo_level level;
- union smb_file file;
struct {
+ union smb_handle_or_path file;
BOOL delete_on_close;
} in;
} disposition_info;
@@ -822,8 +873,8 @@ union smb_setfileinfo {
RAW_SFILEINFO_ALLOCATION_INFORMATION interfaces */
struct {
enum smb_setfileinfo_level level;
- union smb_file file;
struct {
+ union smb_handle_or_path file;
/* w2k3 rounds this up to nearest 4096 */
uint64_t alloc_size;
} in;
@@ -833,8 +884,8 @@ union smb_setfileinfo {
RAW_SFILEINFO_END_OF_FILE_INFORMATION interfaces */
struct {
enum smb_setfileinfo_level level;
- union smb_file file;
struct {
+ union smb_handle_or_path file;
uint64_t size;
} in;
} end_of_file_info;
@@ -842,8 +893,8 @@ union smb_setfileinfo {
/* RAW_SFILEINFO_RENAME_INFORMATION interface */
struct {
enum smb_setfileinfo_level level;
- union smb_file file;
- struct smb_rename_information {
+ struct {
+ union smb_handle_or_path file;
uint8_t overwrite;
uint32_t root_fid;
const char *new_name;
@@ -853,8 +904,8 @@ union smb_setfileinfo {
/* RAW_SFILEINFO_POSITION_INFORMATION interface */
struct {
enum smb_setfileinfo_level level;
- union smb_file file;
struct {
+ union smb_handle_or_path file;
uint64_t position;
} in;
} position_information;
@@ -862,8 +913,8 @@ union smb_setfileinfo {
/* RAW_SFILEINFO_MODE_INFORMATION interface */
struct {
enum smb_setfileinfo_level level;
- union smb_file file;
struct {
+ union smb_handle_or_path file;
/* valid values seem to be 0, 2, 4 and 6 */
uint32_t mode;
} in;
@@ -874,8 +925,8 @@ union smb_setfileinfo {
/* RAW_SFILEINFO_UNIX_BASIC interface */
struct {
enum smb_setfileinfo_level level;
- union smb_file file;
struct {
+ union smb_handle_or_path file;
uint32_t mode; /* yuck - this field remains to fix compile of libcli/clifile.c */
uint64_t end_of_file;
uint64_t num_bytes;
@@ -896,8 +947,8 @@ union smb_setfileinfo {
/* RAW_SFILEINFO_UNIX_LINK, RAW_SFILEINFO_UNIX_HLINK interface */
struct {
enum smb_setfileinfo_level level;
- union smb_file file;
struct {
+ union smb_handle_or_path file;
const char *link_dest;
} in;
} unix_link, unix_hlink;
@@ -905,8 +956,8 @@ union smb_setfileinfo {
/* RAW_FILEINFO_SET_SEC_DESC */
struct {
enum smb_setfileinfo_level level;
- union smb_file file;
struct {
+ union smb_handle_or_path file;
uint32_t secinfo_flags;
struct security_descriptor *sd;
} in;
@@ -1114,9 +1165,6 @@ union smb_open {
/* SMBNTCreateX interface */
struct {
enum smb_open_level level;
- /* this is the output file handle */
- union smb_file file;
-
struct {
uint32_t flags;
uint32_t root_fid;
@@ -1138,8 +1186,8 @@ union smb_open {
struct security_descriptor *sec_desc;
struct smb_ea_list *ea_list;
} in;
-
struct {
+ union smb_handle file;
uint8_t oplock_level;
uint32_t create_action;
NTTIME create_time;
@@ -1158,9 +1206,6 @@ union smb_open {
/* TRANS2_OPEN interface */
struct {
enum smb_open_level level;
- /* this is the output file handle */
- union smb_file file;
-
struct {
uint16_t flags;
uint16_t open_mode;
@@ -1174,8 +1219,8 @@ union smb_open {
uint_t num_eas;
struct ea_struct *eas;
} in;
-
struct {
+ union smb_handle file;
uint16_t attrib;
time_t write_time;
uint32_t size;
@@ -1190,16 +1235,13 @@ union smb_open {
/* SMBopen interface */
struct {
enum smb_open_level level;
- /* this is the output file handle */
- union smb_file file;
-
struct {
uint16_t open_mode;
uint16_t search_attrs;
const char *fname;
} in;
-
struct {
+ union smb_handle file;
uint16_t attrib;
time_t write_time;
uint32_t size;
@@ -1210,9 +1252,6 @@ union smb_open {
/* SMBopenX interface */
struct {
enum smb_open_level level;
- /* this is the output file handle */
- union smb_file file;
-
struct {
uint16_t flags;
uint16_t open_mode;
@@ -1227,6 +1266,7 @@ union smb_open {
const char *fname;
} in;
struct {
+ union smb_handle file;
uint16_t attrib;
time_t write_time;
uint32_t size;
@@ -1243,28 +1283,26 @@ union smb_open {
/* SMBmknew interface */
struct {
enum smb_open_level level;
- /* this is the output file handle */
- union smb_file file;
-
struct {
uint16_t attrib;
time_t write_time;
const char *fname;
} in;
+ struct {
+ union smb_handle file;
+ } out;
} mknew, create;
/* SMBctemp interface */
struct {
enum smb_open_level level;
- /* this is the output file handle */
- union smb_file file;
-
struct {
uint16_t attrib;
time_t write_time;
const char *directory;
} in;
struct {
+ union smb_handle file;
/* temp name, relative to directory */
char *name;
} out;
@@ -1273,23 +1311,20 @@ union smb_open {
/* SMBsplopen interface */
struct {
enum smb_open_level level;
- /* this is the output file handle */
- union smb_file file;
-
struct {
uint16_t setup_length;
uint16_t mode;
const char *ident;
} in;
+ struct {
+ union smb_handle file;
+ } out;
} splopen;
/* chained OpenX/ReadX interface */
struct {
enum smb_open_level level;
- /* this is the output file handle */
- union smb_file file;
-
struct {
uint16_t flags;
uint16_t open_mode;
@@ -1310,6 +1345,7 @@ union smb_open {
uint16_t remaining;
} in;
struct {
+ union smb_handle file;
uint16_t attrib;
time_t write_time;
uint32_t size;
@@ -1345,9 +1381,8 @@ union smb_read {
/* SMBreadX (and generic) interface */
struct {
enum smb_read_level level;
- union smb_file file;
-
struct {
+ union smb_handle file;
uint64_t offset;
uint16_t mincnt;
uint32_t maxcnt;
@@ -1365,9 +1400,8 @@ union smb_read {
/* SMBreadbraw interface */
struct {
enum smb_read_level level;
- union smb_file file;
-
struct {
+ union smb_handle file;
uint64_t offset;
uint16_t maxcnt;
uint16_t mincnt;
@@ -1383,9 +1417,8 @@ union smb_read {
/* SMBlockandread interface */
struct {
enum smb_read_level level;
- union smb_file file;
-
struct {
+ union smb_handle file;
uint16_t count;
uint32_t offset;
uint16_t remaining;
@@ -1399,9 +1432,8 @@ union smb_read {
/* SMBread interface */
struct {
enum smb_read_level level;
- union smb_file file;
-
struct {
+ union smb_handle file;
uint16_t count;
uint32_t offset;
uint16_t remaining;
@@ -1426,9 +1458,8 @@ union smb_write {
/* SMBwriteX interface */
struct {
enum smb_write_level level;
- union smb_file file;
-
struct {
+ union smb_handle file;
uint64_t offset;
uint16_t wmode;
uint16_t remaining;
@@ -1444,9 +1475,8 @@ union smb_write {
/* SMBwriteunlock interface */
struct {
enum smb_write_level level;
- union smb_file file;
-
struct {
+ union smb_handle file;
uint16_t count;
uint32_t offset;
uint16_t remaining;
@@ -1460,9 +1490,8 @@ union smb_write {
/* SMBwrite interface */
struct {
enum smb_write_level level;
- union smb_file file;
-
struct {
+ union smb_handle file;
uint16_t count;
uint32_t offset;
uint16_t remaining;
@@ -1476,9 +1505,8 @@ union smb_write {
/* SMBwriteclose interface */
struct {
enum smb_write_level level;
- union smb_file file;
-
struct {
+ union smb_handle file;
uint16_t count;
uint32_t offset;
time_t mtime;
@@ -1492,9 +1520,8 @@ union smb_write {
/* SMBsplwrite interface */
struct {
enum smb_write_level level;
- union smb_file file;
-
struct {
+ union smb_handle file;
uint16_t count;
const uint8_t *data;
} in;
@@ -1513,9 +1540,8 @@ union smb_lock {
/* SMBlockingX (and generic) interface */
struct {
enum smb_lock_level level;
- union smb_file file;
-
struct {
+ union smb_handle file;
uint16_t mode;
uint32_t timeout;
uint16_t ulock_cnt;
@@ -1531,9 +1557,8 @@ union smb_lock {
/* SMBlock and SMBunlock interface */
struct {
enum smb_lock_level level;
- union smb_file file;
-
struct {
+ union smb_handle file;
uint32_t count;
uint32_t offset;
} in;
@@ -1552,9 +1577,8 @@ union smb_close {
/* SMBclose (and generic) interface */
struct {
enum smb_close_level level;
- union smb_file file;
-
struct {
+ union smb_handle file;
time_t write_time;
} in;
} close, generic;
@@ -1562,7 +1586,9 @@ union smb_close {
/* SMBsplclose interface - empty! */
struct {
enum smb_close_level level;
- union smb_file file;
+ struct {
+ union smb_handle file;
+ } in;
} splclose;
};
@@ -1611,15 +1637,16 @@ union smb_ioctl {
/* generic interface */
struct {
enum smb_ioctl_level level;
- union smb_file file;
-
+ struct {
+ union smb_handle file;
+ } in;
} generic;
/* struct for SMBioctl */
struct {
enum smb_ioctl_level level;
- union smb_file file;
struct {
+ union smb_handle file;
uint32_t request;
} in;
struct {
@@ -1631,8 +1658,8 @@ union smb_ioctl {
/* struct for NT ioctl call */
struct {
enum smb_ioctl_level level;
- union smb_file file;
struct {
+ union smb_handle file;
uint32_t function;
BOOL fsctl;
uint8_t filter;
@@ -1646,7 +1673,9 @@ union smb_ioctl {
/* struct for SMBflush */
union smb_flush {
struct {
- union smb_file file;
+ struct {
+ union smb_handle file;
+ } in;
} flush;
};
@@ -1714,8 +1743,8 @@ struct smb_nttrans {
/* struct for nttrans change notify call */
union smb_notify {
struct {
- union smb_file file;
struct {
+ union smb_handle file;
uint32_t buffer_size;
uint32_t completion_filter;
BOOL recursive;
diff --git a/source4/libcli/raw/rawacl.c b/source4/libcli/raw/rawacl.c
index 7c0c17b4d7..59ac65a340 100644
--- a/source4/libcli/raw/rawacl.c
+++ b/source4/libcli/raw/rawacl.c
@@ -38,7 +38,7 @@ struct smbcli_request *smb_raw_query_secdesc_send(struct smbcli_tree *tree,
nt.in.function = NT_TRANSACT_QUERY_SECURITY_DESC;
nt.in.setup = NULL;
- SSVAL(params, 0, io->query_secdesc.file.fnum);
+ SSVAL(params, 0, io->query_secdesc.in.file.fnum);
SSVAL(params, 2, 0); /* padding */
SIVAL(params, 4, io->query_secdesc.in.secinfo_flags);
@@ -123,7 +123,7 @@ struct smbcli_request *smb_raw_set_secdesc_send(struct smbcli_tree *tree,
nt.in.function = NT_TRANSACT_SET_SECURITY_DESC;
nt.in.setup = NULL;
- SSVAL(params, 0, io->set_secdesc.file.fnum);
+ SSVAL(params, 0, io->set_secdesc.in.file.fnum);
SSVAL(params, 2, 0); /* padding */
SIVAL(params, 4, io->set_secdesc.in.secinfo_flags);
diff --git a/source4/libcli/raw/rawfile.c b/source4/libcli/raw/rawfile.c
index 0e63fa656f..6f8befebfe 100644
--- a/source4/libcli/raw/rawfile.c
+++ b/source4/libcli/raw/rawfile.c
@@ -234,7 +234,7 @@ static NTSTATUS smb_raw_nttrans_create_recv(struct smbcli_request *req,
params = nt.out.params.data;
parms->ntcreatex.out.oplock_level = CVAL(params, 0);
- parms->ntcreatex.file.fnum = SVAL(params, 2);
+ parms->ntcreatex.out.file.fnum = SVAL(params, 2);
parms->ntcreatex.out.create_action = IVAL(params, 4);
parms->ntcreatex.out.create_time = smbcli_pull_nttime(params, 12);
parms->ntcreatex.out.access_time = smbcli_pull_nttime(params, 20);
@@ -406,7 +406,7 @@ static NTSTATUS smb_raw_t2open_recv(struct smbcli_request *req, TALLOC_CTX *mem_
return NT_STATUS_INFO_LENGTH_MISMATCH;
}
- parms->t2open.file.fnum = SVAL(t2.out.params.data, VWV(0));
+ parms->t2open.out.file.fnum = SVAL(t2.out.params.data, VWV(0));
parms->t2open.out.attrib = SVAL(t2.out.params.data, VWV(1));
parms->t2open.out.write_time = raw_pull_dos_date3(transport, t2.out.params.data + VWV(2));
parms->t2open.out.size = IVAL(t2.out.params.data, VWV(4));
@@ -572,7 +572,7 @@ NTSTATUS smb_raw_open_recv(struct smbcli_request *req, TALLOC_CTX *mem_ctx, unio
case RAW_OPEN_OPEN:
SMBCLI_CHECK_WCT(req, 7);
- parms->openold.file.fnum = SVAL(req->in.vwv, VWV(0));
+ parms->openold.out.file.fnum = SVAL(req->in.vwv, VWV(0));
parms->openold.out.attrib = SVAL(req->in.vwv, VWV(1));
parms->openold.out.write_time = raw_pull_dos_date3(req->transport,
req->in.vwv + VWV(2));
@@ -582,7 +582,7 @@ NTSTATUS smb_raw_open_recv(struct smbcli_request *req, TALLOC_CTX *mem_ctx, unio
case RAW_OPEN_OPENX:
SMBCLI_CHECK_MIN_WCT(req, 15);
- parms->openx.file.fnum = SVAL(req->in.vwv, VWV(2));
+ parms->openx.out.file.fnum = SVAL(req->in.vwv, VWV(2));
parms->openx.out.attrib = SVAL(req->in.vwv, VWV(3));
parms->openx.out.write_time = raw_pull_dos_date3(req->transport,
req->in.vwv + VWV(4));
@@ -603,29 +603,29 @@ NTSTATUS smb_raw_open_recv(struct smbcli_request *req, TALLOC_CTX *mem_ctx, unio
case RAW_OPEN_MKNEW:
SMBCLI_CHECK_WCT(req, 1);
- parms->mknew.file.fnum = SVAL(req->in.vwv, VWV(0));
+ parms->mknew.out.file.fnum = SVAL(req->in.vwv, VWV(0));
break;
case RAW_OPEN_CREATE:
SMBCLI_CHECK_WCT(req, 1);
- parms->create.file.fnum = SVAL(req->in.vwv, VWV(0));
+ parms->create.out.file.fnum = SVAL(req->in.vwv, VWV(0));
break;
case RAW_OPEN_CTEMP:
SMBCLI_CHECK_WCT(req, 1);
- parms->ctemp.file.fnum = SVAL(req->in.vwv, VWV(0));
+ parms->ctemp.out.file.fnum = SVAL(req->in.vwv, VWV(0));
smbcli_req_pull_string(req, mem_ctx, &parms->ctemp.out.name, req->in.data, -1, STR_TERMINATE | STR_ASCII);
break;
case RAW_OPEN_SPLOPEN:
SMBCLI_CHECK_WCT(req, 1);
- parms->splopen.file.fnum = SVAL(req->in.vwv, VWV(0));
+ parms->splopen.out.file.fnum = SVAL(req->in.vwv, VWV(0));
break;
case RAW_OPEN_NTCREATEX:
SMBCLI_CHECK_MIN_WCT(req, 34);
parms->ntcreatex.out.oplock_level = CVAL(req->in.vwv, 4);
- parms->ntcreatex.file.fnum = SVAL(req->in.vwv, 5);
+ parms->ntcreatex.out.file.fnum = SVAL(req->in.vwv, 5);
parms->ntcreatex.out.create_action = IVAL(req->in.vwv, 7);
parms->ntcreatex.out.create_time = smbcli_pull_nttime(req->in.vwv, 11);
parms->ntcreatex.out.access_time = smbcli_pull_nttime(req->in.vwv, 19);
@@ -644,7 +644,7 @@ NTSTATUS smb_raw_open_recv(struct smbcli_request *req, TALLOC_CTX *mem_ctx, unio
case RAW_OPEN_OPENX_READX:
SMBCLI_CHECK_MIN_WCT(req, 15);
- parms->openxreadx.file.fnum = SVAL(req->in.vwv, VWV(2));
+ parms->openxreadx.out.file.fnum = SVAL(req->in.vwv, VWV(2));
parms->openxreadx.out.attrib = SVAL(req->in.vwv, VWV(3));
parms->openxreadx.out.write_time = raw_pull_dos_date3(req->transport,
req->in.vwv + VWV(4));
@@ -706,14 +706,14 @@ struct smbcli_request *smb_raw_close_send(struct smbcli_tree *tree, union smb_cl
switch (parms->generic.level) {
case RAW_CLOSE_CLOSE:
SETUP_REQUEST(SMBclose, 3, 0);
- SSVAL(req->out.vwv, VWV(0), parms->close.file.fnum);
+ SSVAL(req->out.vwv, VWV(0), parms->close.in.file.fnum);
raw_push_dos_date3(tree->session->transport,
req->out.vwv, VWV(1), parms->close.in.write_time);
break;
case RAW_CLOSE_SPLCLOSE:
SETUP_REQUEST(SMBsplclose, 3, 0);
- SSVAL(req->out.vwv, VWV(0), parms->splclose.file.fnum);
+ SSVAL(req->out.vwv, VWV(0), parms->splclose.in.file.fnum);
SIVAL(req->out.vwv, VWV(1), 0); /* reserved */
break;
}
@@ -749,14 +749,14 @@ struct smbcli_request *smb_raw_lock_send(struct smbcli_tree *tree, union smb_loc
switch (parms->generic.level) {
case RAW_LOCK_LOCK:
SETUP_REQUEST(SMBlock, 5, 0);
- SSVAL(req->out.vwv, VWV(0), parms->lock.file.fnum);
+ SSVAL(req->out.vwv, VWV(0), parms->lock.in.file.fnum);
SIVAL(req->out.vwv, VWV(1), parms->lock.in.count);
SIVAL(req->out.vwv, VWV(3), parms->lock.in.offset);
break;
case RAW_LOCK_UNLOCK:
SETUP_REQUEST(SMBunlock, 5, 0);
- SSVAL(req->out.vwv, VWV(0), parms->unlock.file.fnum);
+ SSVAL(req->out.vwv, VWV(0), parms->unlock.in.file.fnum);
SIVAL(req->out.vwv, VWV(1), parms->unlock.in.count);
SIVAL(req->out.vwv, VWV(3), parms->unlock.in.offset);
break;
@@ -770,7 +770,7 @@ struct smbcli_request *smb_raw_lock_send(struct smbcli_tree *tree, union smb_loc
SETUP_REQUEST(SMBlockingX, 8, lck_size * lock_count);
SSVAL(req->out.vwv, VWV(0), SMB_CHAIN_NONE);
SSVAL(req->out.vwv, VWV(1), 0);
- SSVAL(req->out.vwv, VWV(2), parms->lockx.file.fnum);
+ SSVAL(req->out.vwv, VWV(2), parms->lockx.in.file.fnum);
SSVAL(req->out.vwv, VWV(3), parms->lockx.in.mode);
SIVAL(req->out.vwv, VWV(4), parms->lockx.in.timeout);
SSVAL(req->out.vwv, VWV(6), parms->lockx.in.ulock_cnt);
@@ -850,7 +850,7 @@ struct smbcli_request *smb_raw_flush_send(struct smbcli_tree *tree, union smb_fl
struct smbcli_request *req;
SETUP_REQUEST(SMBflush, 1, 0);
- SSVAL(req->out.vwv, VWV(0), parms->flush.file.fnum);
+ SSVAL(req->out.vwv, VWV(0), parms->flush.in.file.fnum);
if (!smbcli_request_send(req)) {
smbcli_request_destroy(req);
@@ -881,7 +881,7 @@ struct smbcli_request *smb_raw_seek_send(struct smbcli_tree *tree,
SETUP_REQUEST(SMBlseek, 4, 0);
- SSVAL(req->out.vwv, VWV(0), parms->lseek.file.fnum);
+ SSVAL(req->out.vwv, VWV(0), parms->lseek.in.file.fnum);
SSVAL(req->out.vwv, VWV(1), parms->lseek.in.mode);
SIVALS(req->out.vwv, VWV(2), parms->lseek.in.offset);
diff --git a/source4/libcli/raw/rawfileinfo.c b/source4/libcli/raw/rawfileinfo.c
index b50a330093..cf8f2f71b4 100644
--- a/source4/libcli/raw/rawfileinfo.c
+++ b/source4/libcli/raw/rawfileinfo.c
@@ -536,7 +536,7 @@ static struct smbcli_request *smb_raw_getattr_send(struct smbcli_tree *tree,
req = smbcli_request_setup(tree, SMBgetatr, 0, 0);
if (!req) return NULL;
- smbcli_req_append_ascii4(req, parms->getattr.file.path, STR_TERMINATE);
+ smbcli_req_append_ascii4(req, parms->getattr.in.file.path, STR_TERMINATE);
if (!smbcli_request_send(req)) {
smbcli_request_destroy(req);
@@ -579,7 +579,7 @@ static struct smbcli_request *smb_raw_getattrE_send(struct smbcli_tree *tree,
req = smbcli_request_setup(tree, SMBgetattrE, 1, 0);
if (!req) return NULL;
- SSVAL(req->out.vwv, VWV(0), parms->getattre.file.fnum);
+ SSVAL(req->out.vwv, VWV(0), parms->getattre.in.file.fnum);
if (!smbcli_request_send(req)) {
smbcli_request_destroy(req);
return NULL;
@@ -647,7 +647,7 @@ struct smbcli_request *smb_raw_fileinfo_send(struct smbcli_tree *tree,
}
req = smb_raw_fileinfo_blob_send(tree,
- parms->generic.file.fnum,
+ parms->generic.in.file.fnum,
parms->generic.level, data);
data_blob_free(&data);
@@ -722,7 +722,7 @@ struct smbcli_request *smb_raw_pathinfo_send(struct smbcli_tree *tree,
}
}
- req = smb_raw_pathinfo_blob_send(tree, parms->generic.file.path,
+ req = smb_raw_pathinfo_blob_send(tree, parms->generic.in.file.path,
parms->generic.level, data);
data_blob_free(&data);
diff --git a/source4/libcli/raw/rawioctl.c b/source4/libcli/raw/rawioctl.c
index 28b58ff2a3..db980a55d6 100644
--- a/source4/libcli/raw/rawioctl.c
+++ b/source4/libcli/raw/rawioctl.c
@@ -37,7 +37,7 @@ static struct smbcli_request *smb_raw_smbioctl_send(struct smbcli_tree *tree,
SETUP_REQUEST(SMBioctl, 3, 0);
- SSVAL(req->out.vwv, VWV(0), parms->ioctl.file.fnum);
+ SSVAL(req->out.vwv, VWV(0), parms->ioctl.in.file.fnum);
SIVAL(req->out.vwv, VWV(1), parms->ioctl.in.request);
if (!smbcli_request_send(req)) {
@@ -81,7 +81,7 @@ static struct smbcli_request *smb_raw_ntioctl_send(struct smbcli_tree *tree,
nt.in.setup_count = 4;
nt.in.setup = setup;
SIVAL(setup, 0, parms->ntioctl.in.function);
- SSVAL(setup, 4, parms->ntioctl.file.fnum);
+ SSVAL(setup, 4, parms->ntioctl.in.file.fnum);
SCVAL(setup, 6, parms->ntioctl.in.fsctl);
SCVAL(setup, 7, parms->ntioctl.in.filter);
nt.in.function = NT_TRANSACT_IOCTL;
diff --git a/source4/libcli/raw/rawnotify.c b/source4/libcli/raw/rawnotify.c
index 3adb1b000b..c06f0a59f7 100644
--- a/source4/libcli/raw/rawnotify.c
+++ b/source4/libcli/raw/rawnotify.c
@@ -36,7 +36,7 @@ struct smbcli_request *smb_raw_changenotify_send(struct smbcli_tree *tree, union
nt.in.setup_count = 4;
nt.in.setup = setup;
SIVAL(setup, 0, parms->notify.in.completion_filter);
- SSVAL(setup, 4, parms->notify.file.fnum);
+ SSVAL(setup, 4, parms->notify.in.file.fnum);
SSVAL(setup, 6, parms->notify.in.recursive);
nt.in.function = NT_TRANSACT_NOTIFY_CHANGE;
nt.in.params = data_blob(NULL, 0);
diff --git a/source4/libcli/raw/rawreadwrite.c b/source4/libcli/raw/rawreadwrite.c
index c4e2ab2498..7f1aaf26d4 100644
--- a/source4/libcli/raw/rawreadwrite.c
+++ b/source4/libcli/raw/rawreadwrite.c
@@ -41,7 +41,7 @@ struct smbcli_request *smb_raw_read_send(struct smbcli_tree *tree, union smb_rea
bigoffset = True;
}
SETUP_REQUEST(SMBreadbraw, bigoffset? 10:8, 0);
- SSVAL(req->out.vwv, VWV(0), parms->readbraw.file.fnum);
+ SSVAL(req->out.vwv, VWV(0), parms->readbraw.in.file.fnum);
SIVAL(req->out.vwv, VWV(1), parms->readbraw.in.offset);
SSVAL(req->out.vwv, VWV(3), parms->readbraw.in.maxcnt);
SSVAL(req->out.vwv, VWV(4), parms->readbraw.in.mincnt);
@@ -54,7 +54,7 @@ struct smbcli_request *smb_raw_read_send(struct smbcli_tree *tree, union smb_rea
case RAW_READ_LOCKREAD:
SETUP_REQUEST(SMBlockread, 5, 0);
- SSVAL(req->out.vwv, VWV(0), parms->lockread.file.fnum);
+ SSVAL(req->out.vwv, VWV(0), parms->lockread.in.file.fnum);
SSVAL(req->out.vwv, VWV(1), parms->lockread.in.count);
SIVAL(req->out.vwv, VWV(2), parms->lockread.in.offset);
SSVAL(req->out.vwv, VWV(4), parms->lockread.in.remaining);
@@ -62,7 +62,7 @@ struct smbcli_request *smb_raw_read_send(struct smbcli_tree *tree, union smb_rea
case RAW_READ_READ:
SETUP_REQUEST(SMBread, 5, 0);
- SSVAL(req->out.vwv, VWV(0), parms->read.file.fnum);
+ SSVAL(req->out.vwv, VWV(0), parms->read.in.file.fnum);
SSVAL(req->out.vwv, VWV(1), parms->read.in.count);
SIVAL(req->out.vwv, VWV(2), parms->read.in.offset);
SSVAL(req->out.vwv, VWV(4), parms->read.in.remaining);
@@ -75,7 +75,7 @@ struct smbcli_request *smb_raw_read_send(struct smbcli_tree *tree, union smb_rea
SETUP_REQUEST(SMBreadX, bigoffset ? 12 : 10, 0);
SSVAL(req->out.vwv, VWV(0), SMB_CHAIN_NONE);
SSVAL(req->out.vwv, VWV(1), 0);
- SSVAL(req->out.vwv, VWV(2), parms->readx.file.fnum);
+ SSVAL(req->out.vwv, VWV(2), parms->readx.in.file.fnum);
SIVAL(req->out.vwv, VWV(3), parms->readx.in.offset);
SSVAL(req->out.vwv, VWV(5), parms->readx.in.maxcnt & 0xFFFF);
SSVAL(req->out.vwv, VWV(6), parms->readx.in.mincnt);
@@ -186,7 +186,7 @@ struct smbcli_request *smb_raw_write_send(struct smbcli_tree *tree, union smb_wr
switch (parms->generic.level) {
case RAW_WRITE_WRITEUNLOCK:
SETUP_REQUEST(SMBwriteunlock, 5, 3 + parms->writeunlock.in.count);
- SSVAL(req->out.vwv, VWV(0), parms->writeunlock.file.fnum);
+ SSVAL(req->out.vwv, VWV(0), parms->writeunlock.in.file.fnum);
SSVAL(req->out.vwv, VWV(1), parms->writeunlock.in.count);
SIVAL(req->out.vwv, VWV(2), parms->writeunlock.in.offset);
SSVAL(req->out.vwv, VWV(4), parms->writeunlock.in.remaining);
@@ -200,7 +200,7 @@ struct smbcli_request *smb_raw_write_send(struct smbcli_tree *tree, union smb_wr
case RAW_WRITE_WRITE:
SETUP_REQUEST(SMBwrite, 5, 3 + parms->write.in.count);
- SSVAL(req->out.vwv, VWV(0), parms->write.file.fnum);
+ SSVAL(req->out.vwv, VWV(0), parms->write.in.file.fnum);
SSVAL(req->out.vwv, VWV(1), parms->write.in.count);
SIVAL(req->out.vwv, VWV(2), parms->write.in.offset);
SSVAL(req->out.vwv, VWV(4), parms->write.in.remaining);
@@ -213,7 +213,7 @@ struct smbcli_request *smb_raw_write_send(struct smbcli_tree *tree, union smb_wr
case RAW_WRITE_WRITECLOSE:
SETUP_REQUEST(SMBwriteclose, 6, 1 + parms->writeclose.in.count);
- SSVAL(req->out.vwv, VWV(0), parms->writeclose.file.fnum);
+ SSVAL(req->out.vwv, VWV(0), parms->writeclose.in.file.fnum);
SSVAL(req->out.vwv, VWV(1), parms->writeclose.in.count);
SIVAL(req->out.vwv, VWV(2), parms->writeclose.in.offset);
raw_push_dos_date3(tree->session->transport,
@@ -232,7 +232,7 @@ struct smbcli_request *smb_raw_write_send(struct smbcli_tree *tree, union smb_wr
SETUP_REQUEST(SMBwriteX, bigoffset ? 14 : 12, parms->writex.in.count);
SSVAL(req->out.vwv, VWV(0), SMB_CHAIN_NONE);
SSVAL(req->out.vwv, VWV(1), 0);
- SSVAL(req->out.vwv, VWV(2), parms->writex.file.fnum);
+ SSVAL(req->out.vwv, VWV(2), parms->writex.in.file.fnum);
SIVAL(req->out.vwv, VWV(3), parms->writex.in.offset);
SIVAL(req->out.vwv, VWV(5), 0); /* reserved */
SSVAL(req->out.vwv, VWV(7), parms->writex.in.wmode);
@@ -250,7 +250,7 @@ struct smbcli_request *smb_raw_write_send(struct smbcli_tree *tree, union smb_wr
case RAW_WRITE_SPLWRITE:
SETUP_REQUEST(SMBsplwr, 1, parms->splwrite.in.count);
- SSVAL(req->out.vwv, VWV(0), parms->splwrite.file.fnum);
+ SSVAL(req->out.vwv, VWV(0), parms->splwrite.in.file.fnum);
if (parms->splwrite.in.count > 0) {
memcpy(req->out.data, parms->splwrite.in.data, parms->splwrite.in.count);
}
diff --git a/source4/libcli/raw/rawsetfileinfo.c b/source4/libcli/raw/rawsetfileinfo.c
index 73fcd82802..46480c636e 100644
--- a/source4/libcli/raw/rawsetfileinfo.c
+++ b/source4/libcli/raw/rawsetfileinfo.c
@@ -283,7 +283,7 @@ static struct smbcli_request *smb_raw_setattr_send(struct smbcli_tree *tree,
raw_push_dos_date3(tree->session->transport,
req->out.vwv, VWV(1), parms->setattr.in.write_time);
memset(req->out.vwv + VWV(3), 0, 10); /* reserved */
- smbcli_req_append_ascii4(req, parms->setattr.file.path, STR_TERMINATE);
+ smbcli_req_append_ascii4(req, parms->setattr.in.file.path, STR_TERMINATE);
smbcli_req_append_ascii4(req, "", STR_TERMINATE);
if (!smbcli_request_send(req)) {
@@ -305,7 +305,7 @@ static struct smbcli_request *smb_raw_setattrE_send(struct smbcli_tree *tree,
req = smbcli_request_setup(tree, SMBsetattrE, 7, 0);
if (!req) return NULL;
- SSVAL(req->out.vwv, VWV(0), parms->setattre.file.fnum);
+ SSVAL(req->out.vwv, VWV(0), parms->setattre.in.file.fnum);
raw_push_dos_date2(tree->session->transport,
req->out.vwv, VWV(1), parms->setattre.in.create_time);
raw_push_dos_date2(tree->session->transport,
@@ -352,7 +352,7 @@ struct smbcli_request *smb_raw_setfileinfo_send(struct smbcli_tree *tree,
/* send request and process the output */
req = smb_raw_setfileinfo_blob_send(tree,
mem_ctx,
- parms->generic.file.fnum,
+ parms->generic.in.file.fnum,
parms->generic.level,
&blob);
@@ -399,7 +399,7 @@ struct smbcli_request *smb_raw_setpathinfo_send(struct smbcli_tree *tree,
/* send request and process the output */
req = smb_raw_setpathinfo_blob_send(tree,
mem_ctx,
- parms->generic.file.path,
+ parms->generic.in.file.path,
parms->generic.level,
&blob);
diff --git a/source4/libcli/smb2/getinfo.c b/source4/libcli/smb2/getinfo.c
index 3710fdfa08..d52ff03922 100644
--- a/source4/libcli/smb2/getinfo.c
+++ b/source4/libcli/smb2/getinfo.c
@@ -118,7 +118,7 @@ struct smb2_request *smb2_getinfo_file_send(struct smb2_tree *tree, union smb_fi
ZERO_STRUCT(b);
b.in.max_response_size = 0x10000;
- b.in.handle = io->generic.file.handle;
+ b.in.handle = io->generic.in.file.handle;
b.in.level = smb2_level;
if (io->generic.level == RAW_FILEINFO_SEC_DESC) {
diff --git a/source4/libcli/smb2/setinfo.c b/source4/libcli/smb2/setinfo.c
index ce03a69482..c445880440 100644
--- a/source4/libcli/smb2/setinfo.c
+++ b/source4/libcli/smb2/setinfo.c
@@ -92,7 +92,7 @@ struct smb2_request *smb2_setinfo_file_send(struct smb2_tree *tree, union smb_se
ZERO_STRUCT(b);
b.in.level = smb2_level;
- b.in.handle = io->generic.file.handle;
+ b.in.handle = io->generic.in.file.handle;
if (!smb_raw_setfileinfo_passthru(tree, io->generic.level, io, &b.in.blob)) {
return NULL;
}
diff --git a/source4/libcli/smb_composite/appendacl.c b/source4/libcli/smb_composite/appendacl.c
index b09acfaf63..55aa727729 100644
--- a/source4/libcli/smb_composite/appendacl.c
+++ b/source4/libcli/smb_composite/appendacl.c
@@ -37,7 +37,7 @@ static NTSTATUS appendacl_open(struct composite_context *c,
NT_STATUS_HAVE_NO_MEMORY(state->io_fileinfo);
state->io_fileinfo->query_secdesc.level = RAW_FILEINFO_SEC_DESC;
- state->io_fileinfo->query_secdesc.file.fnum = state->io_open->ntcreatex.file.fnum;
+ state->io_fileinfo->query_secdesc.in.file.fnum = state->io_open->ntcreatex.out.file.fnum;
state->io_fileinfo->query_secdesc.in.secinfo_flags = SECINFO_DACL;
state->req = smb_raw_fileinfo_send(tree, state->io_fileinfo);
@@ -69,7 +69,7 @@ static NTSTATUS appendacl_get(struct composite_context *c,
NT_STATUS_HAVE_NO_MEMORY(state->io_setfileinfo);
state->io_setfileinfo->set_secdesc.level = RAW_SFILEINFO_SEC_DESC;
- state->io_setfileinfo->set_secdesc.file.fnum = state->io_fileinfo->query_secdesc.file.fnum;
+ state->io_setfileinfo->set_secdesc.in.file.fnum = state->io_fileinfo->query_secdesc.in.file.fnum;
state->io_setfileinfo->set_secdesc.in.secinfo_flags = SECINFO_DACL;
state->io_setfileinfo->set_secdesc.in.sd = state->io_fileinfo->query_secdesc.out.sd;
@@ -115,7 +115,7 @@ static NTSTATUS appendacl_set(struct composite_context *c,
state->io_fileinfo->query_secdesc.level = RAW_FILEINFO_SEC_DESC;
- state->io_fileinfo->query_secdesc.file.fnum = state->io_setfileinfo->set_secdesc.file.fnum;
+ state->io_fileinfo->query_secdesc.in.file.fnum = state->io_setfileinfo->set_secdesc.in.file.fnum;
state->io_fileinfo->query_secdesc.in.secinfo_flags = SECINFO_DACL;
state->req = smb_raw_fileinfo_send(tree, state->io_fileinfo);
@@ -150,7 +150,7 @@ static NTSTATUS appendacl_getagain(struct composite_context *c,
NT_STATUS_HAVE_NO_MEMORY(io_close);
io_close->close.level = RAW_CLOSE_CLOSE;
- io_close->close.file.fnum = state->io_fileinfo->query_secdesc.file.fnum;
+ io_close->close.in.file.fnum = state->io_fileinfo->query_secdesc.in.file.fnum;
io_close->close.in.write_time = 0;
state->req = smb_raw_close_send(tree, io_close);
diff --git a/source4/libcli/smb_composite/loadfile.c b/source4/libcli/smb_composite/loadfile.c
index db074bfd2b..8582b71ef4 100644
--- a/source4/libcli/smb_composite/loadfile.c
+++ b/source4/libcli/smb_composite/loadfile.c
@@ -54,7 +54,7 @@ static NTSTATUS setup_close(struct composite_context *c,
NT_STATUS_HAVE_NO_MEMORY(io_close);
io_close->close.level = RAW_CLOSE_CLOSE;
- io_close->close.file.fnum = fnum;
+ io_close->close.in.file.fnum = fnum;
io_close->close.in.write_time = 0;
state->req = smb_raw_close_send(tree, io_close);
@@ -93,7 +93,7 @@ static NTSTATUS loadfile_open(struct composite_context *c,
NT_STATUS_HAVE_NO_MEMORY(io->out.data);
if (io->out.size == 0) {
- return setup_close(c, tree, state->io_open->ntcreatex.file.fnum);
+ return setup_close(c, tree, state->io_open->ntcreatex.out.file.fnum);
}
/* setup for the read */
@@ -101,7 +101,7 @@ static NTSTATUS loadfile_open(struct composite_context *c,
NT_STATUS_HAVE_NO_MEMORY(state->io_read);
state->io_read->readx.level = RAW_READ_READX;
- state->io_read->readx.file.fnum = state->io_open->ntcreatex.file.fnum;
+ state->io_read->readx.in.file.fnum = state->io_open->ntcreatex.out.file.fnum;
state->io_read->readx.in.offset = 0;
state->io_read->readx.in.mincnt = MIN(32768, io->out.size);
state->io_read->readx.in.maxcnt = state->io_read->readx.in.mincnt;
@@ -140,7 +140,7 @@ static NTSTATUS loadfile_read(struct composite_context *c,
/* we might be done */
if (state->io_read->readx.in.offset +
state->io_read->readx.out.nread == io->out.size) {
- return setup_close(c, tree, state->io_read->readx.file.fnum);
+ return setup_close(c, tree, state->io_read->readx.in.file.fnum);
}
/* setup for the next read */
diff --git a/source4/libcli/smb_composite/savefile.c b/source4/libcli/smb_composite/savefile.c
index 89a2d26c0c..d355cf1e26 100644
--- a/source4/libcli/smb_composite/savefile.c
+++ b/source4/libcli/smb_composite/savefile.c
@@ -55,7 +55,7 @@ static NTSTATUS setup_close(struct composite_context *c,
NT_STATUS_HAVE_NO_MEMORY(io_close);
io_close->close.level = RAW_CLOSE_CLOSE;
- io_close->close.file.fnum = fnum;
+ io_close->close.in.file.fnum = fnum;
io_close->close.in.write_time = 0;
state->req = smb_raw_close_send(tree, io_close);
@@ -86,7 +86,7 @@ static NTSTATUS savefile_open(struct composite_context *c,
NT_STATUS_NOT_OK_RETURN(status);
if (io->in.size == 0) {
- return setup_close(c, tree, state->io_open->ntcreatex.file.fnum);
+ return setup_close(c, tree, state->io_open->ntcreatex.out.file.fnum);
}
/* setup for the first write */
@@ -94,7 +94,7 @@ static NTSTATUS savefile_open(struct composite_context *c,
NT_STATUS_HAVE_NO_MEMORY(io_write);
io_write->writex.level = RAW_WRITE_WRITEX;
- io_write->writex.file.fnum = state->io_open->ntcreatex.file.fnum;
+ io_write->writex.in.file.fnum = state->io_open->ntcreatex.out.file.fnum;
io_write->writex.in.offset = 0;
io_write->writex.in.wmode = 0;
io_write->writex.in.remaining = 0;
@@ -135,7 +135,7 @@ static NTSTATUS savefile_write(struct composite_context *c,
/* we might be done */
if (state->io_write->writex.out.nwritten != state->io_write->writex.in.count ||
state->total_written == io->in.size) {
- return setup_close(c, tree, state->io_write->writex.file.fnum);
+ return setup_close(c, tree, state->io_write->writex.in.file.fnum);
}
/* setup for the next write */
diff --git a/source4/librpc/rpc/dcerpc_smb.c b/source4/librpc/rpc/dcerpc_smb.c
index bac91ef134..6700e2f243 100644
--- a/source4/librpc/rpc/dcerpc_smb.c
+++ b/source4/librpc/rpc/dcerpc_smb.c
@@ -152,7 +152,7 @@ static NTSTATUS send_read_request_continue(struct dcerpc_connection *c, DATA_BLO
io = state->io;
io->generic.level = RAW_READ_READX;
- io->readx.file.fnum = smb->fnum;
+ io->readx.in.file.fnum = smb->fnum;
io->readx.in.mincnt = state->data.length - state->received;
io->readx.in.maxcnt = io->readx.in.mincnt;
io->readx.in.offset = 0;
@@ -296,7 +296,7 @@ static NTSTATUS smb_send_request(struct dcerpc_connection *c, DATA_BLOB *blob, B
}
io.generic.level = RAW_WRITE_WRITEX;
- io.writex.file.fnum = smb->fnum;
+ io.writex.in.file.fnum = smb->fnum;
io.writex.in.offset = 0;
io.writex.in.wmode = PIPE_START_MESSAGE;
io.writex.in.remaining = blob->length;
@@ -335,7 +335,7 @@ static NTSTATUS smb_shutdown_pipe(struct dcerpc_connection *c)
if (!smb) return NT_STATUS_OK;
io.close.level = RAW_CLOSE_CLOSE;
- io.close.file.fnum = smb->fnum;
+ io.close.in.file.fnum = smb->fnum;
io.close.in.write_time = 0;
req = smb_raw_close_send(smb->tree, &io);
if (req != NULL) {
@@ -479,7 +479,7 @@ static void pipe_open_recv(struct smbcli_request *req)
goto done;
}
- smb->fnum = state->open->ntcreatex.file.fnum;
+ smb->fnum = state->open->ntcreatex.out.file.fnum;
smb->tree = talloc_reference(smb, state->tree);
smb->server_name= strupper_talloc(
smb, state->tree->session->transport->called.name);
diff --git a/source4/ntvfs/ipc/vfs_ipc.c b/source4/ntvfs/ipc/vfs_ipc.c
index 2df7ac61ab..b652b0f530 100644
--- a/source4/ntvfs/ipc/vfs_ipc.c
+++ b/source4/ntvfs/ipc/vfs_ipc.c
@@ -265,7 +265,7 @@ static NTSTATUS ipc_open_ntcreatex(struct ntvfs_module_context *ntvfs,
}
ZERO_STRUCT(oi->ntcreatex.out);
- oi->ntcreatex.file.fnum = p->fnum;
+ oi->ntcreatex.out.file.fnum = p->fnum;
oi->ntcreatex.out.ipc_state = p->ipc_state;
oi->ntcreatex.out.file_type = FILE_TYPE_MESSAGE_MODE_PIPE;
@@ -288,9 +288,9 @@ static NTSTATUS ipc_open_openx(struct ntvfs_module_context *ntvfs,
}
ZERO_STRUCT(oi->openx.out);
- oi->openx.file.fnum = p->fnum;
- oi->openx.out.ftype = 2;
- oi->openx.out.devstate = p->ipc_state;
+ oi->openx.out.file.fnum = p->fnum;
+ oi->openx.out.ftype = 2;
+ oi->openx.out.devstate = p->ipc_state;
return status;
}
@@ -382,7 +382,7 @@ static NTSTATUS ipc_read(struct ntvfs_module_context *ntvfs,
return ntvfs_map_read(ntvfs, req, rd);
}
- fnum = rd->readx.file.fnum;
+ fnum = rd->readx.in.file.fnum;
p = pipe_state_find(private, fnum);
if (!p) {
@@ -425,7 +425,7 @@ static NTSTATUS ipc_write(struct ntvfs_module_context *ntvfs,
return ntvfs_map_write(ntvfs, req, wr);
}
- fnum = wr->writex.file.fnum;
+ fnum = wr->writex.in.file.fnum;
data.data = discard_const_p(void, wr->writex.in.data);
data.length = wr->writex.in.count;
@@ -478,7 +478,7 @@ static NTSTATUS ipc_close(struct ntvfs_module_context *ntvfs,
return ntvfs_map_close(ntvfs, req, io);
}
- p = pipe_state_find(private, io->close.file.fnum);
+ p = pipe_state_find(private, io->close.in.file.fnum);
if (!p) {
return NT_STATUS_INVALID_HANDLE;
}
diff --git a/source4/ntvfs/nbench/vfs_nbench.c b/source4/ntvfs/nbench/vfs_nbench.c
index b6bce60b08..6dcf58182a 100644
--- a/source4/ntvfs/nbench/vfs_nbench.c
+++ b/source4/ntvfs/nbench/vfs_nbench.c
@@ -214,7 +214,7 @@ static void nbench_qpathinfo_send(struct ntvfs_request *req)
union smb_fileinfo *info = req->async_states->private_data;
nbench_log(req, "QUERY_PATH_INFORMATION \"%s\" %d %s\n",
- info->generic.file.path,
+ info->generic.in.file.path,
info->generic.level,
get_nt_error_c_code(req->async_states->status));
@@ -239,7 +239,7 @@ static void nbench_qfileinfo_send(struct ntvfs_request *req)
union smb_fileinfo *info = req->async_states->private_data;
nbench_log(req, "QUERY_FILE_INFORMATION %d %d %s\n",
- info->generic.file.fnum,
+ info->generic.in.file.fnum,
info->generic.level,
get_nt_error_c_code(req->async_states->status));
@@ -264,7 +264,7 @@ static void nbench_setpathinfo_send(struct ntvfs_request *req)
union smb_setfileinfo *st = req->async_states->private_data;
nbench_log(req, "SET_PATH_INFORMATION \"%s\" %d %s\n",
- st->generic.file.path,
+ st->generic.in.file.path,
st->generic.level,
get_nt_error_c_code(req->async_states->status));
@@ -297,7 +297,7 @@ static void nbench_open_send(struct ntvfs_request *req)
io->ntcreatex.in.fname,
io->ntcreatex.in.create_options,
io->ntcreatex.in.open_disposition,
- io->ntcreatex.file.fnum,
+ io->ntcreatex.out.file.fnum,
get_nt_error_c_code(req->async_states->status));
break;
@@ -431,7 +431,7 @@ static void nbench_read_send(struct ntvfs_request *req)
ZERO_STRUCT(rd->readx.out);
}
nbench_log(req, "ReadX %d %d %d %d %s\n",
- rd->readx.file.fnum,
+ rd->readx.in.file.fnum,
(int)rd->readx.in.offset,
rd->readx.in.maxcnt,
rd->readx.out.nread,
@@ -469,7 +469,7 @@ static void nbench_write_send(struct ntvfs_request *req)
ZERO_STRUCT(wr->writex.out);
}
nbench_log(req, "WriteX %d %d %d %d %s\n",
- wr->writex.file.fnum,
+ wr->writex.in.file.fnum,
(int)wr->writex.in.offset,
wr->writex.in.count,
wr->writex.out.nwritten,
@@ -481,7 +481,7 @@ static void nbench_write_send(struct ntvfs_request *req)
ZERO_STRUCT(wr->write.out);
}
nbench_log(req, "Write %d %d %d %d %s\n",
- wr->write.file.fnum,
+ wr->write.in.file.fnum,
wr->write.in.offset,
wr->write.in.count,
wr->write.out.nwritten,
@@ -536,7 +536,7 @@ static void nbench_flush_send(struct ntvfs_request *req)
union smb_flush *io = req->async_states->private_data;
nbench_log(req, "Flush %d %s\n",
- io->flush.file.fnum,
+ io->flush.in.file.fnum,
get_nt_error_c_code(req->async_states->status));
PASS_THRU_REP_POST(req);
@@ -563,7 +563,7 @@ static void nbench_close_send(struct ntvfs_request *req)
switch (io->generic.level) {
case RAW_CLOSE_CLOSE:
nbench_log(req, "Close %d %s\n",
- io->close.file.fnum,
+ io->close.in.file.fnum,
get_nt_error_c_code(req->async_states->status));
break;
@@ -678,14 +678,14 @@ static void nbench_lock_send(struct ntvfs_request *req)
lck->lockx.in.lock_cnt == 1 &&
lck->lockx.in.ulock_cnt == 0) {
nbench_log(req, "LockX %d %d %d %s\n",
- lck->lockx.file.fnum,
+ lck->lockx.in.file.fnum,
(int)lck->lockx.in.locks[0].offset,
(int)lck->lockx.in.locks[0].count,
get_nt_error_c_code(req->async_states->status));
} else if (lck->generic.level == RAW_LOCK_LOCKX &&
lck->lockx.in.ulock_cnt == 1) {
nbench_log(req, "UnlockX %d %d %d %s\n",
- lck->lockx.file.fnum,
+ lck->lockx.in.file.fnum,
(int)lck->lockx.in.locks[0].offset,
(int)lck->lockx.in.locks[0].count,
get_nt_error_c_code(req->async_states->status));
@@ -714,7 +714,7 @@ static void nbench_setfileinfo_send(struct ntvfs_request *req)
union smb_setfileinfo *info = req->async_states->private_data;
nbench_log(req, "SET_FILE_INFORMATION %d %d %s\n",
- info->generic.file.fnum,
+ info->generic.in.file.fnum,
info->generic.level,
get_nt_error_c_code(req->async_states->status));
diff --git a/source4/ntvfs/ntvfs_generic.c b/source4/ntvfs/ntvfs_generic.c
index e4bc963882..51b03606fb 100644
--- a/source4/ntvfs/ntvfs_generic.c
+++ b/source4/ntvfs/ntvfs_generic.c
@@ -155,7 +155,7 @@ static NTSTATUS ntvfs_map_open_finish(struct ntvfs_module_context *ntvfs,
switch (io->generic.level) {
case RAW_OPEN_OPEN:
- io->openold.file.fnum = io2->generic.file.fnum;
+ io->openold.out.file.fnum = io2->generic.out.file.fnum;
io->openold.out.attrib = io2->generic.out.attrib;
io->openold.out.write_time = nt_time_to_unix(io2->generic.out.write_time);
io->openold.out.size = io2->generic.out.size;
@@ -163,7 +163,7 @@ static NTSTATUS ntvfs_map_open_finish(struct ntvfs_module_context *ntvfs,
break;
case RAW_OPEN_OPENX:
- io->openx.file.fnum = io2->generic.file.fnum;
+ io->openx.out.file.fnum = io2->generic.out.file.fnum;
io->openx.out.attrib = io2->generic.out.attrib;
io->openx.out.write_time = nt_time_to_unix(io2->generic.out.write_time);
io->openx.out.size = io2->generic.out.size;
@@ -183,7 +183,7 @@ static NTSTATUS ntvfs_map_open_finish(struct ntvfs_module_context *ntvfs,
break;
case RAW_OPEN_T2OPEN:
- io->t2open.file.fnum = io2->generic.file.fnum;
+ io->t2open.out.file.fnum = io2->generic.out.file.fnum;
io->t2open.out.attrib = io2->generic.out.attrib;
io->t2open.out.write_time = nt_time_to_unix(io2->generic.out.write_time);
io->t2open.out.size = io2->generic.out.size;
@@ -196,14 +196,14 @@ static NTSTATUS ntvfs_map_open_finish(struct ntvfs_module_context *ntvfs,
case RAW_OPEN_MKNEW:
case RAW_OPEN_CREATE:
- io->mknew.file.fnum = io2->generic.file.fnum;
- write_time = io->mknew.in.write_time;
+ io->mknew.out.file.fnum = io2->generic.out.file.fnum;
+ write_time = io->mknew.in.write_time;
break;
case RAW_OPEN_CTEMP:
- io->ctemp.file.fnum = io2->generic.file.fnum;
- io->ctemp.out.name = talloc_strdup(req, io2->generic.in.fname +
- strlen(io->ctemp.in.directory) + 1);
+ io->ctemp.out.file.fnum = io2->generic.out.file.fnum;
+ io->ctemp.out.name = talloc_strdup(req, io2->generic.in.fname +
+ strlen(io->ctemp.in.directory) + 1);
NT_STATUS_HAVE_NO_MEMORY(io->ctemp.out.name);
break;
@@ -220,7 +220,7 @@ static NTSTATUS ntvfs_map_open_finish(struct ntvfs_module_context *ntvfs,
sf = talloc(req, union smb_setfileinfo);
NT_STATUS_HAVE_NO_MEMORY(sf);
sf->generic.level = RAW_SFILEINFO_STANDARD;
- sf->generic.file.fnum = io2->generic.file.fnum;
+ sf->generic.in.file.fnum = io2->generic.out.file.fnum;
sf->standard.in.create_time = 0;
sf->standard.in.write_time = write_time;
sf->standard.in.access_time = 0;
@@ -231,7 +231,7 @@ static NTSTATUS ntvfs_map_open_finish(struct ntvfs_module_context *ntvfs,
sf = talloc(req, union smb_setfileinfo);
NT_STATUS_HAVE_NO_MEMORY(sf);
sf->generic.level = RAW_SFILEINFO_END_OF_FILE_INFORMATION;
- sf->generic.file.fnum = io2->generic.file.fnum;
+ sf->generic.in.file.fnum = io2->generic.out.file.fnum;
sf->end_of_file_info.in.size = set_size;
status = ntvfs->ops->setfileinfo(ntvfs, req, sf);
if (NT_STATUS_IS_OK(status)) {
@@ -861,7 +861,7 @@ _PUBLIC_ NTSTATUS ntvfs_map_qfileinfo(struct ntvfs_module_context *ntvfs,
/* ask the backend for the generic info */
info2->generic.level = RAW_FILEINFO_GENERIC;
- info2->generic.file.fnum = info->generic.file.fnum;
+ info2->generic.in.file.fnum = info->generic.in.file.fnum;
/* only used by the simple backend, which doesn't do async */
req->async_states->state &= ~NTVFS_ASYNC_STATE_MAY_ASYNC;
@@ -893,8 +893,8 @@ _PUBLIC_ NTSTATUS ntvfs_map_qpathinfo(struct ntvfs_module_context *ntvfs,
}
/* ask the backend for the generic info */
- info2->generic.level = RAW_FILEINFO_GENERIC;
- info2->generic.file.path = info->generic.file.path;
+ info2->generic.level = RAW_FILEINFO_GENERIC;
+ info2->generic.in.file.path = info->generic.in.file.path;
/* only used by the simple backend, which doesn't do async */
req->async_states->state &= ~NTVFS_ASYNC_STATE_MAY_ASYNC;
@@ -943,7 +943,7 @@ _PUBLIC_ NTSTATUS ntvfs_map_lock(struct ntvfs_module_context *ntvfs,
}
lck2->generic.level = RAW_LOCK_GENERIC;
- lck2->generic.file.fnum = lck->lock.file.fnum;
+ lck2->generic.in.file.fnum = lck->lock.in.file.fnum;
lck2->generic.in.mode = 0;
lck2->generic.in.timeout = 0;
lck2->generic.in.locks = locks;
@@ -990,10 +990,10 @@ static NTSTATUS ntvfs_map_write_finish(struct ntvfs_module_context *ntvfs,
return NT_STATUS_NO_MEMORY;
}
- lck->unlock.level = RAW_LOCK_UNLOCK;
- lck->unlock.file.fnum = wr->writeunlock.file.fnum;
- lck->unlock.in.count = wr->writeunlock.in.count;
- lck->unlock.in.offset = wr->writeunlock.in.offset;
+ lck->unlock.level = RAW_LOCK_UNLOCK;
+ lck->unlock.in.file.fnum= wr->writeunlock.in.file.fnum;
+ lck->unlock.in.count = wr->writeunlock.in.count;
+ lck->unlock.in.offset = wr->writeunlock.in.offset;
if (lck->unlock.in.count != 0) {
/* do the lock sync for now */
@@ -1012,9 +1012,9 @@ static NTSTATUS ntvfs_map_write_finish(struct ntvfs_module_context *ntvfs,
return NT_STATUS_NO_MEMORY;
}
- cl->close.level = RAW_CLOSE_CLOSE;
- cl->close.file.fnum = wr->writeclose.file.fnum;
- cl->close.in.write_time = wr->writeclose.in.mtime;
+ cl->close.level = RAW_CLOSE_CLOSE;
+ cl->close.in.file.fnum = wr->writeclose.in.file.fnum;
+ cl->close.in.write_time = wr->writeclose.in.mtime;
if (wr2->generic.in.count != 0) {
/* do the close sync for now */
@@ -1064,7 +1064,7 @@ _PUBLIC_ NTSTATUS ntvfs_map_write(struct ntvfs_module_context *ntvfs,
break;
case RAW_WRITE_WRITE:
- wr2->writex.file.fnum = wr->write.file.fnum;
+ wr2->writex.in.file.fnum = wr->write.in.file.fnum;
wr2->writex.in.offset = wr->write.in.offset;
wr2->writex.in.wmode = 0;
wr2->writex.in.remaining = wr->write.in.remaining;
@@ -1074,7 +1074,7 @@ _PUBLIC_ NTSTATUS ntvfs_map_write(struct ntvfs_module_context *ntvfs,
break;
case RAW_WRITE_WRITEUNLOCK:
- wr2->writex.file.fnum = wr->writeunlock.file.fnum;
+ wr2->writex.in.file.fnum = wr->writeunlock.in.file.fnum;
wr2->writex.in.offset = wr->writeunlock.in.offset;
wr2->writex.in.wmode = 0;
wr2->writex.in.remaining = wr->writeunlock.in.remaining;
@@ -1084,7 +1084,7 @@ _PUBLIC_ NTSTATUS ntvfs_map_write(struct ntvfs_module_context *ntvfs,
break;
case RAW_WRITE_WRITECLOSE:
- wr2->writex.file.fnum = wr->writeclose.file.fnum;
+ wr2->writex.in.file.fnum = wr->writeclose.in.file.fnum;
wr2->writex.in.offset = wr->writeclose.in.offset;
wr2->writex.in.wmode = 0;
wr2->writex.in.remaining = 0;
@@ -1094,7 +1094,7 @@ _PUBLIC_ NTSTATUS ntvfs_map_write(struct ntvfs_module_context *ntvfs,
break;
case RAW_WRITE_SPLWRITE:
- wr2->writex.file.fnum = wr->splwrite.file.fnum;
+ wr2->writex.in.file.fnum = wr->splwrite.in.file.fnum;
wr2->writex.in.offset = 0;
wr2->writex.in.wmode = 0;
wr2->writex.in.remaining = 0;
@@ -1166,7 +1166,7 @@ _PUBLIC_ NTSTATUS ntvfs_map_read(struct ntvfs_module_context *ntvfs,
break;
case RAW_READ_READ:
- rd2->readx.file.fnum = rd->read.file.fnum;
+ rd2->readx.in.file.fnum = rd->read.in.file.fnum;
rd2->readx.in.offset = rd->read.in.offset;
rd2->readx.in.mincnt = rd->read.in.count;
rd2->readx.in.maxcnt = rd->read.in.count;
@@ -1176,7 +1176,7 @@ _PUBLIC_ NTSTATUS ntvfs_map_read(struct ntvfs_module_context *ntvfs,
break;
case RAW_READ_READBRAW:
- rd2->readx.file.fnum = rd->readbraw.file.fnum;
+ rd2->readx.in.file.fnum = rd->readbraw.in.file.fnum;
rd2->readx.in.offset = rd->readbraw.in.offset;
rd2->readx.in.mincnt = rd->readbraw.in.mincnt;
rd2->readx.in.maxcnt = rd->readbraw.in.maxcnt;
@@ -1195,14 +1195,14 @@ _PUBLIC_ NTSTATUS ntvfs_map_read(struct ntvfs_module_context *ntvfs,
status = NT_STATUS_NO_MEMORY;
goto done;
}
- lck->lock.level = RAW_LOCK_LOCK;
- lck->lock.file.fnum = rd->lockread.file.fnum;
- lck->lock.in.count = rd->lockread.in.count;
- lck->lock.in.offset = rd->lockread.in.offset;
+ lck->lock.level = RAW_LOCK_LOCK;
+ lck->lock.in.file.fnum = rd->lockread.in.file.fnum;
+ lck->lock.in.count = rd->lockread.in.count;
+ lck->lock.in.offset = rd->lockread.in.offset;
status = ntvfs->ops->lock(ntvfs, req, lck);
req->async_states->state = state;
- rd2->readx.file.fnum = rd->lockread.file.fnum;
+ rd2->readx.in.file.fnum = rd->lockread.in.file.fnum;
rd2->readx.in.offset = rd->lockread.in.offset;
rd2->readx.in.mincnt = rd->lockread.in.count;
rd2->readx.in.maxcnt = rd->lockread.in.count;
@@ -1239,8 +1239,8 @@ _PUBLIC_ NTSTATUS ntvfs_map_close(struct ntvfs_module_context *ntvfs,
return NT_STATUS_INVALID_LEVEL;
case RAW_CLOSE_SPLCLOSE:
- cl2->close.level = RAW_CLOSE_CLOSE;
- cl2->close.file.fnum = cl->splclose.file.fnum;
+ cl2->close.level = RAW_CLOSE_CLOSE;
+ cl2->close.in.file.fnum = cl->splclose.in.file.fnum;
break;
}
diff --git a/source4/ntvfs/posix/pvfs_flush.c b/source4/ntvfs/posix/pvfs_flush.c
index f0ab02f96b..ad87ed623b 100644
--- a/source4/ntvfs/posix/pvfs_flush.c
+++ b/source4/ntvfs/posix/pvfs_flush.c
@@ -46,8 +46,8 @@ NTSTATUS pvfs_flush(struct ntvfs_module_context *ntvfs,
struct pvfs_state *pvfs = ntvfs->private_data;
struct pvfs_file *f;
- if (io->flush.file.fnum != 0xFFFF) {
- f = pvfs_find_fd(pvfs, req, io->flush.file.fnum);
+ if (io->flush.in.file.fnum != 0xFFFF) {
+ f = pvfs_find_fd(pvfs, req, io->flush.in.file.fnum);
if (!f) {
return NT_STATUS_INVALID_HANDLE;
}
diff --git a/source4/ntvfs/posix/pvfs_ioctl.c b/source4/ntvfs/posix/pvfs_ioctl.c
index 032aec1d8d..829da47a12 100644
--- a/source4/ntvfs/posix/pvfs_ioctl.c
+++ b/source4/ntvfs/posix/pvfs_ioctl.c
@@ -42,7 +42,7 @@ static NTSTATUS pvfs_ntioctl(struct ntvfs_module_context *ntvfs,
struct pvfs_state *pvfs = ntvfs->private_data;
struct pvfs_file *f;
- f = pvfs_find_fd(pvfs, req, io->ntioctl.file.fnum);
+ f = pvfs_find_fd(pvfs, req, io->ntioctl.in.file.fnum);
if (!f) {
return NT_STATUS_INVALID_HANDLE;
}
diff --git a/source4/ntvfs/posix/pvfs_lock.c b/source4/ntvfs/posix/pvfs_lock.c
index b9b9832d51..4dbb13cb42 100644
--- a/source4/ntvfs/posix/pvfs_lock.c
+++ b/source4/ntvfs/posix/pvfs_lock.c
@@ -243,7 +243,7 @@ static NTSTATUS pvfs_lock_cancel(struct pvfs_state *pvfs, struct ntvfs_request *
/* check if the lock request matches exactly - you can only cancel with exact matches */
if (p->lck->lockx.in.ulock_cnt == lck->lockx.in.ulock_cnt &&
p->lck->lockx.in.lock_cnt == lck->lockx.in.lock_cnt &&
- p->lck->lockx.file.fnum == lck->lockx.file.fnum &&
+ p->lck->lockx.in.file.fnum == lck->lockx.in.file.fnum &&
p->lck->lockx.in.mode == (lck->lockx.in.mode & ~LOCKING_ANDX_CANCEL_LOCK)) {
int i;
@@ -285,7 +285,7 @@ NTSTATUS pvfs_lock(struct ntvfs_module_context *ntvfs,
return ntvfs_map_lock(ntvfs, req, lck);
}
- f = pvfs_find_fd(pvfs, req, lck->lockx.file.fnum);
+ f = pvfs_find_fd(pvfs, req, lck->lockx.in.file.fnum);
if (!f) {
return NT_STATUS_INVALID_HANDLE;
}
diff --git a/source4/ntvfs/posix/pvfs_open.c b/source4/ntvfs/posix/pvfs_open.c
index fcae5f8d61..d4b2d0b30a 100644
--- a/source4/ntvfs/posix/pvfs_open.c
+++ b/source4/ntvfs/posix/pvfs_open.c
@@ -144,7 +144,7 @@ static NTSTATUS pvfs_open_setup_eas_acl(struct pvfs_state *pvfs,
if (io->ntcreatex.in.sec_desc) {
union smb_setfileinfo set;
- set.set_secdesc.file.fnum = fnum;
+ set.set_secdesc.in.file.fnum = fnum;
set.set_secdesc.in.secinfo_flags = SECINFO_DACL;
set.set_secdesc.in.sd = io->ntcreatex.in.sec_desc;
@@ -390,7 +390,7 @@ static NTSTATUS pvfs_open_directory(struct pvfs_state *pvfs,
talloc_steal(pvfs, f);
io->generic.out.oplock_level = OPLOCK_NONE;
- io->generic.file.fnum = f->fnum;
+ io->generic.out.file.fnum = f->fnum;
io->generic.out.create_action = create_action;
io->generic.out.create_time = name->dos.create_time;
io->generic.out.access_time = name->dos.access_time;
@@ -712,7 +712,7 @@ static NTSTATUS pvfs_create_file(struct pvfs_state *pvfs,
} else {
io->generic.out.oplock_level = OPLOCK_NONE;
}
- io->generic.file.fnum = f->fnum;
+ io->generic.out.file.fnum = f->fnum;
io->generic.out.create_action = NTCREATEX_ACTION_CREATED;
io->generic.out.create_time = name->dos.create_time;
io->generic.out.access_time = name->dos.access_time;
@@ -880,7 +880,7 @@ static NTSTATUS pvfs_open_deny_dos(struct ntvfs_module_context *ntvfs,
name = f->handle->name;
io->generic.out.oplock_level = OPLOCK_NONE;
- io->generic.file.fnum = f->fnum;
+ io->generic.out.file.fnum = f->fnum;
io->generic.out.create_action = NTCREATEX_ACTION_EXISTED;
io->generic.out.create_time = name->dos.create_time;
io->generic.out.access_time = name->dos.access_time;
@@ -1239,7 +1239,7 @@ NTSTATUS pvfs_open(struct ntvfs_module_context *ntvfs,
} else {
io->generic.out.oplock_level = OPLOCK_NONE;
}
- io->generic.file.fnum = f->fnum;
+ io->generic.out.file.fnum = f->fnum;
io->generic.out.create_action = stream_existed?
NTCREATEX_ACTION_EXISTED:NTCREATEX_ACTION_CREATED;
io->generic.out.create_time = name->dos.create_time;
@@ -1278,7 +1278,7 @@ NTSTATUS pvfs_close(struct ntvfs_module_context *ntvfs,
return ntvfs_map_close(ntvfs, req, io);
}
- f = pvfs_find_fd(pvfs, req, io->close.file.fnum);
+ f = pvfs_find_fd(pvfs, req, io->close.in.file.fnum);
if (!f) {
return NT_STATUS_INVALID_HANDLE;
}
diff --git a/source4/ntvfs/posix/pvfs_qfileinfo.c b/source4/ntvfs/posix/pvfs_qfileinfo.c
index b01b7bb649..c23a3c8348 100644
--- a/source4/ntvfs/posix/pvfs_qfileinfo.c
+++ b/source4/ntvfs/posix/pvfs_qfileinfo.c
@@ -289,7 +289,7 @@ NTSTATUS pvfs_qpathinfo(struct ntvfs_module_context *ntvfs,
NTSTATUS status;
/* resolve the cifs name to a posix name */
- status = pvfs_resolve_name(pvfs, req, info->generic.file.path, PVFS_RESOLVE_STREAMS, &name);
+ status = pvfs_resolve_name(pvfs, req, info->generic.in.file.path, PVFS_RESOLVE_STREAMS, &name);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
@@ -326,7 +326,7 @@ NTSTATUS pvfs_qfileinfo(struct ntvfs_module_context *ntvfs,
NTSTATUS status;
uint32_t access_needed;
- f = pvfs_find_fd(pvfs, req, info->generic.file.fnum);
+ f = pvfs_find_fd(pvfs, req, info->generic.in.file.fnum);
if (!f) {
return NT_STATUS_INVALID_HANDLE;
}
diff --git a/source4/ntvfs/posix/pvfs_read.c b/source4/ntvfs/posix/pvfs_read.c
index a6b7cf6dd0..c88f49d116 100644
--- a/source4/ntvfs/posix/pvfs_read.c
+++ b/source4/ntvfs/posix/pvfs_read.c
@@ -41,7 +41,7 @@ NTSTATUS pvfs_read(struct ntvfs_module_context *ntvfs,
return ntvfs_map_read(ntvfs, req, rd);
}
- f = pvfs_find_fd(pvfs, req, rd->readx.file.fnum);
+ f = pvfs_find_fd(pvfs, req, rd->readx.in.file.fnum);
if (!f) {
return NT_STATUS_INVALID_HANDLE;
}
diff --git a/source4/ntvfs/posix/pvfs_seek.c b/source4/ntvfs/posix/pvfs_seek.c
index 1d43f2c855..dbfb4e1c3d 100644
--- a/source4/ntvfs/posix/pvfs_seek.c
+++ b/source4/ntvfs/posix/pvfs_seek.c
@@ -35,7 +35,7 @@ NTSTATUS pvfs_seek(struct ntvfs_module_context *ntvfs,
struct pvfs_file_handle *h;
NTSTATUS status;
- f = pvfs_find_fd(pvfs, req, io->lseek.file.fnum);
+ f = pvfs_find_fd(pvfs, req, io->lseek.in.file.fnum);
if (!f) {
return NT_STATUS_INVALID_HANDLE;
}
diff --git a/source4/ntvfs/posix/pvfs_setfileinfo.c b/source4/ntvfs/posix/pvfs_setfileinfo.c
index 5a6643bdd4..45edaa5b94 100644
--- a/source4/ntvfs/posix/pvfs_setfileinfo.c
+++ b/source4/ntvfs/posix/pvfs_setfileinfo.c
@@ -71,14 +71,14 @@ static uint32_t pvfs_setfileinfo_access(union smb_setfileinfo *info)
static NTSTATUS pvfs_setfileinfo_rename(struct pvfs_state *pvfs,
struct ntvfs_request *req,
struct pvfs_filename *name,
- struct smb_rename_information *r)
+ union smb_setfileinfo *info)
{
NTSTATUS status;
struct pvfs_filename *name2;
char *new_name, *p;
/* renames are only allowed within a directory */
- if (strchr_m(r->new_name, '\\')) {
+ if (strchr_m(info->rename_information.in.new_name, '\\')) {
return NT_STATUS_NOT_SUPPORTED;
}
@@ -93,7 +93,7 @@ static NTSTATUS pvfs_setfileinfo_rename(struct pvfs_state *pvfs,
}
/* w2k3 does not appear to allow relative rename */
- if (r->root_fid != 0) {
+ if (info->rename_information.in.root_fid != 0) {
return NT_STATUS_INVALID_PARAMETER;
}
@@ -108,7 +108,8 @@ static NTSTATUS pvfs_setfileinfo_rename(struct pvfs_state *pvfs,
}
*p = 0;
- new_name = talloc_asprintf(req, "%s\\%s", new_name, r->new_name);
+ new_name = talloc_asprintf(req, "%s\\%s", new_name,
+ info->rename_information.in.new_name);
if (new_name == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -128,7 +129,7 @@ static NTSTATUS pvfs_setfileinfo_rename(struct pvfs_state *pvfs,
return NT_STATUS_OK;
}
- if (!r->overwrite) {
+ if (!info->rename_information.in.overwrite) {
return NT_STATUS_OBJECT_NAME_COLLISION;
}
@@ -249,7 +250,7 @@ NTSTATUS pvfs_setfileinfo(struct ntvfs_module_context *ntvfs,
NTSTATUS status;
uint32_t access_needed;
- f = pvfs_find_fd(pvfs, req, info->generic.file.fnum);
+ f = pvfs_find_fd(pvfs, req, info->generic.in.file.fnum);
if (!f) {
return NT_STATUS_INVALID_HANDLE;
}
@@ -358,7 +359,7 @@ NTSTATUS pvfs_setfileinfo(struct ntvfs_module_context *ntvfs,
case RAW_SFILEINFO_RENAME_INFORMATION:
return pvfs_setfileinfo_rename(pvfs, req, h->name,
- &info->rename_information.in);
+ info);
case RAW_SFILEINFO_SEC_DESC:
return pvfs_acl_set(pvfs, req, h->name, h->fd, f->access_mask, info);
@@ -435,7 +436,7 @@ NTSTATUS pvfs_setpathinfo(struct ntvfs_module_context *ntvfs,
uint32_t access_needed;
/* resolve the cifs name to a posix name */
- status = pvfs_resolve_name(pvfs, req, info->generic.file.path,
+ status = pvfs_resolve_name(pvfs, req, info->generic.in.file.path,
PVFS_RESOLVE_STREAMS, &name);
if (!NT_STATUS_IS_OK(status)) {
return status;
@@ -534,7 +535,7 @@ NTSTATUS pvfs_setpathinfo(struct ntvfs_module_context *ntvfs,
case RAW_SFILEINFO_RENAME_INFORMATION:
return pvfs_setfileinfo_rename(pvfs, req, name,
- &info->rename_information.in);
+ info);
case RAW_SFILEINFO_DISPOSITION_INFO:
case RAW_SFILEINFO_DISPOSITION_INFORMATION:
diff --git a/source4/ntvfs/posix/pvfs_write.c b/source4/ntvfs/posix/pvfs_write.c
index c16b66b7cc..6930a0ba41 100644
--- a/source4/ntvfs/posix/pvfs_write.c
+++ b/source4/ntvfs/posix/pvfs_write.c
@@ -40,7 +40,7 @@ NTSTATUS pvfs_write(struct ntvfs_module_context *ntvfs,
return ntvfs_map_write(ntvfs, req, wr);
}
- f = pvfs_find_fd(pvfs, req, wr->writex.file.fnum);
+ f = pvfs_find_fd(pvfs, req, wr->writex.in.file.fnum);
if (!f) {
return NT_STATUS_INVALID_HANDLE;
}
diff --git a/source4/ntvfs/simple/vfs_simple.c b/source4/ntvfs/simple/vfs_simple.c
index add0c54291..fe43776dcc 100644
--- a/source4/ntvfs/simple/vfs_simple.c
+++ b/source4/ntvfs/simple/vfs_simple.c
@@ -252,12 +252,12 @@ static NTSTATUS svfs_qpathinfo(struct ntvfs_module_context *ntvfs,
char *unix_path;
struct stat st;
- DEBUG(19,("svfs_qpathinfo: file %s level 0x%x\n", info->generic.file.path, info->generic.level));
+ DEBUG(19,("svfs_qpathinfo: file %s level 0x%x\n", info->generic.in.file.path, info->generic.level));
if (info->generic.level != RAW_FILEINFO_GENERIC) {
return ntvfs_map_qpathinfo(ntvfs, req, info);
}
- unix_path = svfs_unix_path(ntvfs, req, info->generic.file.path);
+ unix_path = svfs_unix_path(ntvfs, req, info->generic.in.file.path);
DEBUG(19,("svfs_qpathinfo: file %s\n", unix_path));
if (stat(unix_path, &st) == -1) {
DEBUG(19,("svfs_qpathinfo: file %s errno=%d\n", unix_path, errno));
@@ -281,12 +281,12 @@ static NTSTATUS svfs_qfileinfo(struct ntvfs_module_context *ntvfs,
return ntvfs_map_qfileinfo(ntvfs, req, info);
}
- f = find_fd(private, info->generic.file.fnum);
+ f = find_fd(private, info->generic.in.file.fnum);
if (!f) {
return NT_STATUS_INVALID_HANDLE;
}
- if (fstat(info->generic.file.fnum, &st) == -1) {
+ if (fstat(info->generic.in.file.fnum, &st) == -1) {
return map_nt_error_from_unix(errno);
}
@@ -388,7 +388,7 @@ do_open:
unix_to_nt_time(&io->generic.out.access_time, st.st_atime);
unix_to_nt_time(&io->generic.out.write_time, st.st_mtime);
unix_to_nt_time(&io->generic.out.change_time, st.st_mtime);
- io->generic.file.fnum = fd;
+ io->generic.out.file.fnum = fd;
io->generic.out.alloc_size = st.st_size;
io->generic.out.size = st.st_size;
io->generic.out.attrib = svfs_unix_to_dos_attrib(st.st_mode);
@@ -484,7 +484,7 @@ static NTSTATUS svfs_read(struct ntvfs_module_context *ntvfs,
return NT_STATUS_NOT_SUPPORTED;
}
- ret = pread(rd->readx.file.fnum,
+ ret = pread(rd->readx.in.file.fnum,
rd->readx.out.data,
rd->readx.in.maxcnt,
rd->readx.in.offset);
@@ -513,7 +513,7 @@ static NTSTATUS svfs_write(struct ntvfs_module_context *ntvfs,
CHECK_READ_ONLY(req);
- ret = pwrite(wr->writex.file.fnum,
+ ret = pwrite(wr->writex.in.file.fnum,
wr->writex.in.data,
wr->writex.in.count,
wr->writex.in.offset);
@@ -544,7 +544,7 @@ static NTSTATUS svfs_flush(struct ntvfs_module_context *ntvfs,
struct ntvfs_request *req,
union smb_flush *io)
{
- fsync(io->flush.file.fnum);
+ fsync(io->flush.in.file.fnum);
return NT_STATUS_OK;
}
@@ -563,12 +563,12 @@ static NTSTATUS svfs_close(struct ntvfs_module_context *ntvfs,
return NT_STATUS_INVALID_LEVEL;
}
- f = find_fd(private, io->close.file.fnum);
+ f = find_fd(private, io->close.in.file.fnum);
if (!f) {
return NT_STATUS_INVALID_HANDLE;
}
- if (close(io->close.file.fnum) == -1) {
+ if (close(io->close.in.file.fnum) == -1) {
return map_nt_error_from_unix(errno);
}
@@ -651,7 +651,7 @@ static NTSTATUS svfs_setfileinfo(struct ntvfs_module_context *ntvfs,
switch (info->generic.level) {
case RAW_SFILEINFO_END_OF_FILE_INFO:
case RAW_SFILEINFO_END_OF_FILE_INFORMATION:
- if (ftruncate(info->end_of_file_info.file.fnum,
+ if (ftruncate(info->end_of_file_info.in.file.fnum,
info->end_of_file_info.in.size) == -1) {
return map_nt_error_from_unix(errno);
}
@@ -659,7 +659,7 @@ static NTSTATUS svfs_setfileinfo(struct ntvfs_module_context *ntvfs,
case RAW_SFILEINFO_SETATTRE:
unix_times.actime = info->setattre.in.access_time;
unix_times.modtime = info->setattre.in.write_time;
- fd = info->setattre.file.fnum;
+ fd = info->setattre.in.file.fnum;
if (unix_times.actime == 0 && unix_times.modtime == 0) {
break;
diff --git a/source4/smb_server/smb/nttrans.c b/source4/smb_server/smb/nttrans.c
index 846cea9796..ea47d99d28 100644
--- a/source4/smb_server/smb/nttrans.c
+++ b/source4/smb_server/smb/nttrans.c
@@ -77,7 +77,7 @@ static NTSTATUS nttrans_create_send(struct nttrans_op *op)
NT_STATUS_HAVE_NO_MEMORY(params);
SSVAL(params, 0, io->ntcreatex.out.oplock_level);
- SSVAL(params, 2, io->ntcreatex.file.fnum);
+ SSVAL(params, 2, io->ntcreatex.out.file.fnum);
SIVAL(params, 4, io->ntcreatex.out.create_action);
SIVAL(params, 8, 0); /* ea error offset */
push_nttime(params, 12, io->ntcreatex.out.create_time);
@@ -234,7 +234,7 @@ static NTSTATUS nttrans_query_sec_desc(struct smbsrv_request *req,
NT_STATUS_HAVE_NO_MEMORY(io);
io->query_secdesc.level = RAW_FILEINFO_SEC_DESC;
- io->query_secdesc.file.fnum = SVAL(trans->in.params.data, 0);
+ io->query_secdesc.in.file.fnum = SVAL(trans->in.params.data, 0);
io->query_secdesc.in.secinfo_flags = IVAL(trans->in.params.data, 4);
op->op_info = io;
@@ -263,7 +263,7 @@ static NTSTATUS nttrans_set_sec_desc(struct smbsrv_request *req,
NT_STATUS_HAVE_NO_MEMORY(io);
io->set_secdesc.level = RAW_SFILEINFO_SEC_DESC;
- io->set_secdesc.file.fnum = SVAL(trans->in.params.data, 0);
+ io->set_secdesc.in.file.fnum = SVAL(trans->in.params.data, 0);
io->set_secdesc.in.secinfo_flags = IVAL(trans->in.params.data, 4);
io->set_secdesc.in.sd = talloc(io, struct security_descriptor);
@@ -322,7 +322,7 @@ static NTSTATUS nttrans_ioctl(struct smbsrv_request *req,
blob = &trans->in.data;
nt->ntioctl.level = RAW_IOCTL_NTIOCTL;
- nt->ntioctl.file.fnum = fnum;
+ nt->ntioctl.in.file.fnum = fnum;
nt->ntioctl.in.function = function;
nt->ntioctl.in.fsctl = fsctl;
nt->ntioctl.in.filter = filter;
@@ -404,7 +404,7 @@ static NTSTATUS nttrans_notify_change(struct smbsrv_request *req,
NT_STATUS_HAVE_NO_MEMORY(info);
info->notify.in.completion_filter = IVAL(trans->in.setup, 0);
- info->notify.file.fnum = SVAL(trans->in.setup, 4);
+ info->notify.in.file.fnum = SVAL(trans->in.setup, 4);
info->notify.in.recursive = SVAL(trans->in.setup, 6);
info->notify.in.buffer_size = trans->in.max_param;
diff --git a/source4/smb_server/smb/reply.c b/source4/smb_server/smb/reply.c
index 8b6dedb81a..ac0ab1a166 100644
--- a/source4/smb_server/smb/reply.c
+++ b/source4/smb_server/smb/reply.c
@@ -235,9 +235,9 @@ void smbsrv_reply_ioctl(struct smbsrv_request *req)
REQ_CHECK_WCT(req, 3);
REQ_TALLOC(io, union smb_ioctl);
- io->ioctl.level = RAW_IOCTL_IOCTL;
- io->ioctl.file.fnum = req_fnum(req, req->in.vwv, VWV(0));
- io->ioctl.in.request = IVAL(req->in.vwv, VWV(1));
+ io->ioctl.level = RAW_IOCTL_IOCTL;
+ io->ioctl.in.file.fnum = req_fnum(req, req->in.vwv, VWV(0));
+ io->ioctl.in.request = IVAL(req->in.vwv, VWV(1));
req->async_states->state |= NTVFS_ASYNC_STATE_MAY_ASYNC;
req->async_states->send_fn = reply_ioctl_send;
@@ -303,8 +303,8 @@ void smbsrv_reply_getatr(struct smbsrv_request *req)
st->getattr.level = RAW_FILEINFO_GETATTR;
/* parse request */
- req_pull_ascii4(req, &st->getattr.file.path, req->in.data, STR_TERMINATE);
- if (!st->getattr.file.path) {
+ req_pull_ascii4(req, &st->getattr.in.file.path, req->in.data, STR_TERMINATE);
+ if (!st->getattr.in.file.path) {
smbsrv_send_error(req, NT_STATUS_OBJECT_NAME_NOT_FOUND);
return;
}
@@ -335,9 +335,9 @@ void smbsrv_reply_setatr(struct smbsrv_request *req)
st->setattr.in.attrib = SVAL(req->in.vwv, VWV(0));
st->setattr.in.write_time = srv_pull_dos_date3(req->smb_conn, req->in.vwv + VWV(1));
- req_pull_ascii4(req, &st->setattr.file.path, req->in.data, STR_TERMINATE);
+ req_pull_ascii4(req, &st->setattr.in.file.path, req->in.data, STR_TERMINATE);
- if (!st->setattr.file.path) {
+ if (!st->setattr.in.file.path) {
smbsrv_send_error(req, NT_STATUS_OBJECT_NAME_NOT_FOUND);
return;
}
@@ -410,7 +410,7 @@ static void reply_open_send(struct smbsrv_request *req)
/* construct reply */
smbsrv_setup_reply(req, 7, 0);
- SSVAL(req->out.vwv, VWV(0), oi->openold.file.fnum);
+ SSVAL(req->out.vwv, VWV(0), oi->openold.out.file.fnum);
SSVAL(req->out.vwv, VWV(1), oi->openold.out.attrib);
srv_push_dos_date3(req->smb_conn, req->out.vwv, VWV(2), oi->openold.out.write_time);
SIVAL(req->out.vwv, VWV(4), oi->openold.out.size);
@@ -470,7 +470,7 @@ static void reply_open_and_X_send(struct smbsrv_request *req)
SSVAL(req->out.vwv, VWV(0), SMB_CHAIN_NONE);
SSVAL(req->out.vwv, VWV(1), 0);
- SSVAL(req->out.vwv, VWV(2), oi->openx.file.fnum);
+ SSVAL(req->out.vwv, VWV(2), oi->openx.out.file.fnum);
SSVAL(req->out.vwv, VWV(3), oi->openx.out.attrib);
srv_push_dos_date3(req->smb_conn, req->out.vwv, VWV(4), oi->openx.out.write_time);
SIVAL(req->out.vwv, VWV(6), oi->openx.out.size);
@@ -485,7 +485,7 @@ static void reply_open_and_X_send(struct smbsrv_request *req)
REQ_VWV_RESERVED(17, 2);
}
- req->chained_fnum = oi->openx.file.fnum;
+ req->chained_fnum = oi->openx.out.file.fnum;
smbsrv_chain_reply(req);
}
@@ -542,7 +542,7 @@ static void reply_mknew_send(struct smbsrv_request *req)
/* build the reply */
smbsrv_setup_reply(req, 1, 0);
- SSVAL(req->out.vwv, VWV(0), oi->mknew.file.fnum);
+ SSVAL(req->out.vwv, VWV(0), oi->mknew.out.file.fnum);
smbsrv_send_reply(req);
}
@@ -596,7 +596,7 @@ static void reply_ctemp_send(struct smbsrv_request *req)
/* build the reply */
smbsrv_setup_reply(req, 1, 0);
- SSVAL(req->out.vwv, VWV(0), oi->ctemp.file.fnum);
+ SSVAL(req->out.vwv, VWV(0), oi->ctemp.out.file.fnum);
/* the returned filename is relative to the directory */
req_push_str(req, NULL, oi->ctemp.out.name, -1, STR_TERMINATE | STR_ASCII);
@@ -682,7 +682,7 @@ void smbsrv_reply_readbraw(struct smbsrv_request *req)
goto failed;
}
- io.readbraw.file.fnum = req_fnum(req, req->in.vwv, VWV(0));
+ io.readbraw.in.file.fnum = req_fnum(req, req->in.vwv, VWV(0));
io.readbraw.in.offset = IVAL(req->in.vwv, VWV(1));
io.readbraw.in.maxcnt = SVAL(req->in.vwv, VWV(3));
io.readbraw.in.mincnt = SVAL(req->in.vwv, VWV(4));
@@ -766,7 +766,7 @@ void smbsrv_reply_lockread(struct smbsrv_request *req)
REQ_TALLOC(io, union smb_read);
io->lockread.level = RAW_READ_LOCKREAD;
- io->lockread.file.fnum = req_fnum(req, req->in.vwv, VWV(0));
+ io->lockread.in.file.fnum = req_fnum(req, req->in.vwv, VWV(0));
io->lockread.in.count = SVAL(req->in.vwv, VWV(1));
io->lockread.in.offset = IVAL(req->in.vwv, VWV(2));
io->lockread.in.remaining = SVAL(req->in.vwv, VWV(4));
@@ -825,7 +825,7 @@ void smbsrv_reply_read(struct smbsrv_request *req)
REQ_TALLOC(io, union smb_read);
io->read.level = RAW_READ_READ;
- io->read.file.fnum = req_fnum(req, req->in.vwv, VWV(0));
+ io->read.in.file.fnum = req_fnum(req, req->in.vwv, VWV(0));
io->read.in.count = SVAL(req->in.vwv, VWV(1));
io->read.in.offset = IVAL(req->in.vwv, VWV(2));
io->read.in.remaining = SVAL(req->in.vwv, VWV(4));
@@ -895,7 +895,7 @@ void smbsrv_reply_read_and_X(struct smbsrv_request *req)
REQ_TALLOC(io, union smb_read);
io->readx.level = RAW_READ_READX;
- io->readx.file.fnum = req_fnum(req, req->in.vwv, VWV(2));
+ io->readx.in.file.fnum = req_fnum(req, req->in.vwv, VWV(2));
io->readx.in.offset = IVAL(req->in.vwv, VWV(3));
io->readx.in.maxcnt = SVAL(req->in.vwv, VWV(5));
io->readx.in.mincnt = SVAL(req->in.vwv, VWV(6));
@@ -978,7 +978,7 @@ void smbsrv_reply_writeunlock(struct smbsrv_request *req)
REQ_TALLOC(io, union smb_write);
io->writeunlock.level = RAW_WRITE_WRITEUNLOCK;
- io->writeunlock.file.fnum = req_fnum(req, req->in.vwv, VWV(0));
+ io->writeunlock.in.file.fnum = req_fnum(req, req->in.vwv, VWV(0));
io->writeunlock.in.count = SVAL(req->in.vwv, VWV(1));
io->writeunlock.in.offset = IVAL(req->in.vwv, VWV(2));
io->writeunlock.in.remaining = SVAL(req->in.vwv, VWV(4));
@@ -1036,7 +1036,7 @@ void smbsrv_reply_write(struct smbsrv_request *req)
REQ_TALLOC(io, union smb_write);
io->write.level = RAW_WRITE_WRITE;
- io->write.file.fnum = req_fnum(req, req->in.vwv, VWV(0));
+ io->write.in.file.fnum = req_fnum(req, req->in.vwv, VWV(0));
io->write.in.count = SVAL(req->in.vwv, VWV(1));
io->write.in.offset = IVAL(req->in.vwv, VWV(2));
io->write.in.remaining = SVAL(req->in.vwv, VWV(4));
@@ -1101,7 +1101,7 @@ void smbsrv_reply_write_and_X(struct smbsrv_request *req)
REQ_TALLOC(io, union smb_write);
io->writex.level = RAW_WRITE_WRITEX;
- io->writex.file.fnum = req_fnum(req, req->in.vwv, VWV(2));
+ io->writex.in.file.fnum = req_fnum(req, req->in.vwv, VWV(2));
io->writex.in.offset = IVAL(req->in.vwv, VWV(3));
io->writex.in.wmode = SVAL(req->in.vwv, VWV(7));
io->writex.in.remaining = SVAL(req->in.vwv, VWV(8));
@@ -1159,9 +1159,9 @@ void smbsrv_reply_lseek(struct smbsrv_request *req)
REQ_CHECK_WCT(req, 4);
REQ_TALLOC(io, union smb_seek);
- io->lseek.file.fnum = req_fnum(req, req->in.vwv, VWV(0));
- io->lseek.in.mode = SVAL(req->in.vwv, VWV(1));
- io->lseek.in.offset = IVALS(req->in.vwv, VWV(2));
+ io->lseek.in.file.fnum = req_fnum(req, req->in.vwv, VWV(0));
+ io->lseek.in.mode = SVAL(req->in.vwv, VWV(1));
+ io->lseek.in.offset = IVALS(req->in.vwv, VWV(2));
req->async_states->state |= NTVFS_ASYNC_STATE_MAY_ASYNC;
req->async_states->send_fn = reply_lseek_send;
@@ -1184,7 +1184,7 @@ void smbsrv_reply_flush(struct smbsrv_request *req)
REQ_CHECK_WCT(req, 1);
REQ_TALLOC(io, union smb_flush);
- io->flush.file.fnum = req_fnum(req, req->in.vwv, VWV(0));
+ io->flush.in.file.fnum = req_fnum(req, req->in.vwv, VWV(0));
req->async_states->state |= NTVFS_ASYNC_STATE_MAY_ASYNC;
req->async_states->send_fn = reply_simple_send;
@@ -1234,7 +1234,7 @@ void smbsrv_reply_close(struct smbsrv_request *req)
REQ_TALLOC(io, union smb_close);
io->close.level = RAW_CLOSE_CLOSE;
- io->close.file.fnum = req_fnum(req, req->in.vwv, VWV(0));
+ io->close.in.file.fnum = req_fnum(req, req->in.vwv, VWV(0));
io->close.in.write_time = srv_pull_dos_date3(req->smb_conn, req->in.vwv + VWV(1));
req->async_states->state |= NTVFS_ASYNC_STATE_MAY_ASYNC;
@@ -1280,7 +1280,7 @@ void smbsrv_reply_writeclose(struct smbsrv_request *req)
REQ_TALLOC(io, union smb_write);
io->writeclose.level = RAW_WRITE_WRITECLOSE;
- io->writeclose.file.fnum = req_fnum(req, req->in.vwv, VWV(0));
+ io->writeclose.in.file.fnum = req_fnum(req, req->in.vwv, VWV(0));
io->writeclose.in.count = SVAL(req->in.vwv, VWV(1));
io->writeclose.in.offset = IVAL(req->in.vwv, VWV(2));
io->writeclose.in.mtime = srv_pull_dos_date3(req->smb_conn, req->in.vwv + VWV(4));
@@ -1313,10 +1313,10 @@ void smbsrv_reply_lock(struct smbsrv_request *req)
REQ_CHECK_WCT(req, 5);
REQ_TALLOC(lck, union smb_lock);
- lck->lock.level = RAW_LOCK_LOCK;
- lck->lock.file.fnum = req_fnum(req, req->in.vwv, VWV(0));
- lck->lock.in.count = IVAL(req->in.vwv, VWV(1));
- lck->lock.in.offset = IVAL(req->in.vwv, VWV(3));
+ lck->lock.level = RAW_LOCK_LOCK;
+ lck->lock.in.file.fnum = req_fnum(req, req->in.vwv, VWV(0));
+ lck->lock.in.count = IVAL(req->in.vwv, VWV(1));
+ lck->lock.in.offset = IVAL(req->in.vwv, VWV(3));
req->async_states->state |= NTVFS_ASYNC_STATE_MAY_ASYNC;
req->async_states->send_fn = reply_simple_send;
@@ -1339,10 +1339,10 @@ void smbsrv_reply_unlock(struct smbsrv_request *req)
REQ_CHECK_WCT(req, 5);
REQ_TALLOC(lck, union smb_lock);
- lck->unlock.level = RAW_LOCK_UNLOCK;
- lck->unlock.file.fnum = req_fnum(req, req->in.vwv, VWV(0));
- lck->unlock.in.count = IVAL(req->in.vwv, VWV(1));
- lck->unlock.in.offset = IVAL(req->in.vwv, VWV(3));
+ lck->unlock.level = RAW_LOCK_UNLOCK;
+ lck->unlock.in.file.fnum = req_fnum(req, req->in.vwv, VWV(0));
+ lck->unlock.in.count = IVAL(req->in.vwv, VWV(1));
+ lck->unlock.in.offset = IVAL(req->in.vwv, VWV(3));
req->async_states->state |= NTVFS_ASYNC_STATE_MAY_ASYNC;
req->async_states->send_fn = reply_simple_send;
@@ -1420,7 +1420,7 @@ static void reply_printopen_send(struct smbsrv_request *req)
/* construct reply */
smbsrv_setup_reply(req, 1, 0);
- SSVAL(req->out.vwv, VWV(0), oi->openold.file.fnum);
+ SSVAL(req->out.vwv, VWV(0), oi->openold.out.file.fnum);
smbsrv_send_reply(req);
}
@@ -1464,7 +1464,7 @@ void smbsrv_reply_printclose(struct smbsrv_request *req)
REQ_TALLOC(io, union smb_close);
io->splclose.level = RAW_CLOSE_SPLCLOSE;
- io->splclose.file.fnum = req_fnum(req, req->in.vwv, VWV(0));
+ io->splclose.in.file.fnum = req_fnum(req, req->in.vwv, VWV(0));
req->async_states->state |= NTVFS_ASYNC_STATE_MAY_ASYNC;
req->async_states->send_fn = reply_simple_send;
@@ -1564,7 +1564,7 @@ void smbsrv_reply_printwrite(struct smbsrv_request *req)
return;
}
- io->splwrite.file.fnum= req_fnum(req, req->in.vwv, VWV(0));
+ io->splwrite.in.file.fnum = req_fnum(req, req->in.vwv, VWV(0));
io->splwrite.in.count = SVAL(req->in.data, 1);
io->splwrite.in.data = req->in.data + 3;
@@ -1793,7 +1793,7 @@ void smbsrv_reply_lockingX(struct smbsrv_request *req)
REQ_TALLOC(lck, union smb_lock);
lck->lockx.level = RAW_LOCK_LOCKX;
- lck->lockx.file.fnum = req_fnum(req, req->in.vwv, VWV(2));
+ lck->lockx.in.file.fnum = req_fnum(req, req->in.vwv, VWV(2));
lck->lockx.in.mode = SVAL(req->in.vwv, VWV(3));
lck->lockx.in.timeout = IVAL(req->in.vwv, VWV(4));
lck->lockx.in.ulock_cnt = SVAL(req->in.vwv, VWV(6));
@@ -1880,7 +1880,7 @@ void smbsrv_reply_setattrE(struct smbsrv_request *req)
REQ_TALLOC(info, union smb_setfileinfo);
info->setattre.level = RAW_SFILEINFO_SETATTRE;
- info->setattre.file.fnum = req_fnum(req, req->in.vwv, VWV(0));
+ info->setattre.in.file.fnum = req_fnum(req, req->in.vwv, VWV(0));
info->setattre.in.create_time = srv_pull_dos_date2(req->smb_conn, req->in.vwv + VWV(1));
info->setattre.in.access_time = srv_pull_dos_date2(req->smb_conn, req->in.vwv + VWV(3));
info->setattre.in.write_time = srv_pull_dos_date2(req->smb_conn, req->in.vwv + VWV(5));
@@ -1948,7 +1948,7 @@ void smbsrv_reply_getattrE(struct smbsrv_request *req)
REQ_TALLOC(info, union smb_fileinfo);
info->getattr.level = RAW_FILEINFO_GETATTRE;
- info->getattr.file.fnum = req_fnum(req, req->in.vwv, VWV(0));
+ info->getattr.in.file.fnum = req_fnum(req, req->in.vwv, VWV(0));
req->async_states->state |= NTVFS_ASYNC_STATE_MAY_ASYNC;
req->async_states->send_fn = reply_getattrE_send;
@@ -2269,7 +2269,7 @@ static void reply_ntcreate_and_X_send(struct smbsrv_request *req)
SCVAL(req->out.vwv, VWV(2), io->ntcreatex.out.oplock_level);
/* the rest of the parameters are not aligned! */
- SSVAL(req->out.vwv, 5, io->ntcreatex.file.fnum);
+ SSVAL(req->out.vwv, 5, io->ntcreatex.out.file.fnum);
SIVAL(req->out.vwv, 7, io->ntcreatex.out.create_action);
push_nttime(req->out.vwv, 11, io->ntcreatex.out.create_time);
push_nttime(req->out.vwv, 19, io->ntcreatex.out.access_time);
@@ -2282,7 +2282,7 @@ static void reply_ntcreate_and_X_send(struct smbsrv_request *req)
SSVAL(req->out.vwv, 65, io->ntcreatex.out.ipc_state);
SCVAL(req->out.vwv, 67, io->ntcreatex.out.is_directory);
- req->chained_fnum = io->ntcreatex.file.fnum;
+ req->chained_fnum = io->ntcreatex.out.file.fnum;
smbsrv_chain_reply(req);
}
diff --git a/source4/smb_server/smb/trans2.c b/source4/smb_server/smb/trans2.c
index 113828fbfa..faf204607e 100644
--- a/source4/smb_server/smb/trans2.c
+++ b/source4/smb_server/smb/trans2.c
@@ -459,7 +459,7 @@ static NTSTATUS trans2_open(struct smbsrv_request *req, struct smb_trans2 *trans
trans2_setup_reply(req, trans, 30, 0, 0);
- SSVAL(trans->out.params.data, VWV(0), io->t2open.file.fnum);
+ SSVAL(trans->out.params.data, VWV(0), io->t2open.out.file.fnum);
SSVAL(trans->out.params.data, VWV(1), io->t2open.out.attrib);
srv_push_dos_date3(req->smb_conn, trans->out.params.data,
VWV(2), io->t2open.out.write_time);
@@ -769,8 +769,8 @@ static NTSTATUS trans2_qpathinfo(struct smbsrv_request *req, struct smb_trans2 *
level = SVAL(trans->in.params.data, 0);
- trans2_pull_blob_string(req, &trans->in.params, 6, &st.generic.file.path, 0);
- if (st.generic.file.path == NULL) {
+ trans2_pull_blob_string(req, &trans->in.params, 6, &st.generic.in.file.path, 0);
+ if (st.generic.in.file.path == NULL) {
return NT_STATUS_FOOBAR;
}
@@ -816,7 +816,7 @@ static NTSTATUS trans2_qfileinfo(struct smbsrv_request *req, struct smb_trans2 *
return NT_STATUS_FOOBAR;
}
- st.generic.file.fnum = SVAL(trans->in.params.data, 0);
+ st.generic.in.file.fnum = SVAL(trans->in.params.data, 0);
level = SVAL(trans->in.params.data, 2);
/* work out the backend level - we make it 1-1 in the header */
@@ -963,7 +963,7 @@ static NTSTATUS trans2_setfileinfo(struct smbsrv_request *req, struct smb_trans2
blob = &trans->in.data;
- st.generic.file.fnum = fnum;
+ st.generic.in.file.fnum = fnum;
st.generic.level = (enum smb_setfileinfo_level)level;
status = trans2_parse_sfileinfo(req, &st, blob);
@@ -1000,8 +1000,8 @@ static NTSTATUS trans2_setpathinfo(struct smbsrv_request *req, struct smb_trans2
blob = &trans->in.data;
st.generic.level = (enum smb_setfileinfo_level)level;
- trans2_pull_blob_string(req, &trans->in.params, 6, &st.generic.file.path, 0);
- if (st.generic.file.path == NULL) {
+ trans2_pull_blob_string(req, &trans->in.params, 6, &st.generic.in.file.path, 0);
+ if (st.generic.in.file.path == NULL) {
return NT_STATUS_FOOBAR;
}
diff --git a/source4/torture/basic/delaywrite.c b/source4/torture/basic/delaywrite.c
index 2a41508bcc..37a9528f97 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.file.fnum = fnum1;
+ finfo1.basic_info.in.file.fnum = fnum1;
finfo2 = finfo1;
status = smb_raw_fileinfo(cli->tree, mem_ctx, &finfo1);
@@ -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.file.fnum = fnum1;
+ finfo1.basic_info.in.file.fnum = fnum1;
finfo2 = finfo1;
status = smb_raw_fileinfo(cli->tree, mem_ctx, &finfo1);
@@ -170,7 +170,7 @@ static BOOL test_delayed_write_update2(struct smbcli_state *cli, TALLOC_CTX *mem
union smb_setfileinfo sfinfo;
time_t t_set = time(NULL);
sfinfo.basic_info.level = RAW_SFILEINFO_BASIC_INFO;
- sfinfo.basic_info.file.fnum = fnum1;
+ sfinfo.basic_info.in.file.fnum = fnum1;
sfinfo.basic_info.in.create_time = finfo1.basic_info.out.create_time;
sfinfo.basic_info.in.access_time = finfo1.basic_info.out.access_time;
@@ -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.file.path = fname;
+ finfo2.basic_info.in.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.file.fnum = fnum1;
+ finfo1.basic_info.in.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.flush.file.fnum = fnum1;
+ flsh.flush.in.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.file.fnum = fnum2;
+ finfo1.basic_info.in.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.file.fnum = fnum1;
+ finfo1.basic_info.in.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.file.fnum = fnum1;
+ finfo1.basic_info.in.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.file.fnum = fnum1;
+ finfo1.basic_info.in.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.file.path = fname;
+ finfo2.basic_info.in.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.file.path = fname;
+ finfo2.basic_info.in.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 6aae6d073b..98bd00010f 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.file.fnum = fnum;
+ io.all_info.in.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.file.fnum = fnum;
+ io.standard_info.in.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 5715238fca..127df9052d 100644
--- a/source4/torture/basic/denytest.c
+++ b/source4/torture/basic/denytest.c
@@ -1851,7 +1851,7 @@ static BOOL torture_ntdenytest(struct smbcli_state *cli1, struct smbcli_state *c
/* we can't use smbcli_read() as we need to
set read_for_execute */
r.readx.level = RAW_READ_READX;
- r.readx.file.fnum = io2.ntcreatex.file.fnum;
+ r.readx.in.file.fnum = io2.ntcreatex.out.file.fnum;
r.readx.in.offset = 0;
r.readx.in.mincnt = sizeof(buf);
r.readx.in.maxcnt = sizeof(buf);
@@ -1864,17 +1864,17 @@ static BOOL torture_ntdenytest(struct smbcli_state *cli1, struct smbcli_state *c
if (NT_STATUS_IS_OK(status)) {
res += A_R;
}
- if (smbcli_write(cli2->tree,
- io2.ntcreatex.file.fnum, 0, buf, 0, sizeof(buf)) >= 1) {
+ if (smbcli_write(cli2->tree, io2.ntcreatex.out.file.fnum,
+ 0, buf, 0, sizeof(buf)) >= 1) {
res += A_W;
}
}
if (NT_STATUS_IS_OK(status1)) {
- smbcli_close(cli1->tree, io1.ntcreatex.file.fnum);
+ smbcli_close(cli1->tree, io1.ntcreatex.out.file.fnum);
}
if (NT_STATUS_IS_OK(status2)) {
- smbcli_close(cli2->tree, io2.ntcreatex.file.fnum);
+ smbcli_close(cli2->tree, io2.ntcreatex.out.file.fnum);
}
status2_p = predict_share_conflict(io1.ntcreatex.in.share_access,
@@ -2014,28 +2014,28 @@ 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.file.fnum;
+ fnum1 = io.openx.out.file.fnum;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum2 = io.openx.file.fnum;
+ fnum2 = io.openx.out.file.fnum;
printf("fnum1=%d fnum2=%d\n", fnum1, fnum2);
sfinfo.generic.level = RAW_SFILEINFO_POSITION_INFORMATION;
- sfinfo.position_information.file.fnum = fnum1;
+ sfinfo.position_information.in.file.fnum = fnum1;
sfinfo.position_information.in.position = 1000;
status = smb_raw_setfileinfo(cli->tree, &sfinfo);
CHECK_STATUS(status, NT_STATUS_OK);
printf("two handles should be same file handle\n");
finfo.position_information.level = RAW_FILEINFO_POSITION_INFORMATION;
- finfo.position_information.file.fnum = fnum1;
+ finfo.position_information.in.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.file.fnum = fnum2;
+ finfo.position_information.in.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);
@@ -2048,29 +2048,29 @@ 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.file.fnum;
+ fnum1 = io.openx.out.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.file.fnum;
+ fnum2 = io.openx.out.file.fnum;
printf("fnum1=%d fnum2=%d\n", fnum1, fnum2);
printf("two handles should be separate\n");
sfinfo.generic.level = RAW_SFILEINFO_POSITION_INFORMATION;
- sfinfo.position_information.file.fnum = fnum1;
+ sfinfo.position_information.in.file.fnum = fnum1;
sfinfo.position_information.in.position = 1000;
status = smb_raw_setfileinfo(cli->tree, &sfinfo);
CHECK_STATUS(status, NT_STATUS_OK);
finfo.position_information.level = RAW_FILEINFO_POSITION_INFORMATION;
- finfo.position_information.file.fnum = fnum1;
+ finfo.position_information.in.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.file.fnum = fnum2;
+ finfo.position_information.in.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 8ad11ccb6c..bc892120e3 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.file.fnum = fnum;
+ io.lockx.in.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 79ce27e2df..b28d92a586 100644
--- a/source4/torture/gentest.c
+++ b/source4/torture/gentest.c
@@ -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.file.fnum = fnum;
+ io.close.in.file.fnum = fnum;
io.close.in.write_time = 0;
req = smb_raw_close_send(tree, &io);
@@ -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.file.fnum);
+ ADD_HANDLE(parm[0].openx.in.fname, openx.out.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.file.fnum);
+ ADD_HANDLE(parm[0].openold.in.fname, openold.out.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.file.fnum);
+ ADD_HANDLE(parm[0].ntcreatex.in.fname, ntcreatex.out.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.file.fnum = gen_fnum_close(instance);
+ parm[0].close.in.file.fnum = gen_fnum_close(instance);
parm[0].close.in.write_time = gen_timet();
GEN_COPY_PARM;
- GEN_SET_FNUM(close.file.fnum);
+ GEN_SET_FNUM(close.in.file.fnum);
GEN_CALL(smb_raw_close(tree, &parm[i]));
- REMOVE_HANDLE(close.file.fnum);
+ REMOVE_HANDLE(close.in.file.fnum);
return True;
}
@@ -1323,12 +1323,12 @@ static BOOL handler_seek(int instance)
union smb_seek parm[NSERVERS];
NTSTATUS status[NSERVERS];
- parm[0].lseek.file.fnum = gen_fnum(instance);
+ parm[0].lseek.in.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(lseek.file.fnum);
+ GEN_SET_FNUM(lseek.in.file.fnum);
GEN_CALL(smb_raw_seek(tree, &parm[i]));
CHECK_EQUAL(lseek.out.offset);
@@ -1346,7 +1346,7 @@ static BOOL handler_readx(int instance)
NTSTATUS status[NSERVERS];
parm[0].readx.level = RAW_READ_READX;
- parm[0].readx.file.fnum = gen_fnum(instance);
+ parm[0].readx.in.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();
@@ -1356,7 +1356,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.file.fnum);
+ GEN_SET_FNUM(readx.in.file.fnum);
GEN_CALL(smb_raw_read(tree, &parm[i]));
CHECK_EQUAL(readx.out.remaining);
@@ -1375,7 +1375,7 @@ static BOOL handler_writex(int instance)
NTSTATUS status[NSERVERS];
parm[0].writex.level = RAW_WRITE_WRITEX;
- parm[0].writex.file.fnum = gen_fnum(instance);
+ parm[0].writex.in.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();
@@ -1383,7 +1383,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.file.fnum);
+ GEN_SET_FNUM(writex.in.file.fnum);
GEN_CALL(smb_raw_write(tree, &parm[i]));
CHECK_EQUAL(writex.out.nwritten);
@@ -1402,7 +1402,7 @@ static BOOL handler_lockingx(int instance)
int n, nlocks;
parm[0].lockx.level = RAW_LOCK_LOCKX;
- parm[0].lockx.file.fnum = gen_fnum(instance);
+ parm[0].lockx.in.file.fnum = gen_fnum(instance);
parm[0].lockx.in.mode = gen_lock_mode();
parm[0].lockx.in.timeout = gen_timeout();
do {
@@ -1425,7 +1425,7 @@ static BOOL handler_lockingx(int instance)
}
GEN_COPY_PARM;
- GEN_SET_FNUM(lockx.file.fnum);
+ GEN_SET_FNUM(lockx.in.file.fnum);
GEN_CALL(smb_raw_lock(tree, &parm[i]));
return True;
@@ -1642,7 +1642,7 @@ static BOOL handler_qpathinfo(int instance)
union smb_fileinfo parm[NSERVERS];
NTSTATUS status[NSERVERS];
- parm[0].generic.file.path = gen_fname_open(instance);
+ parm[0].generic.in.file.path = gen_fname_open(instance);
gen_fileinfo(instance, &parm[0]);
@@ -1660,12 +1660,12 @@ static BOOL handler_qfileinfo(int instance)
union smb_fileinfo parm[NSERVERS];
NTSTATUS status[NSERVERS];
- parm[0].generic.file.fnum = gen_fnum(instance);
+ parm[0].generic.in.file.fnum = gen_fnum(instance);
gen_fileinfo(instance, &parm[0]);
GEN_COPY_PARM;
- GEN_SET_FNUM(generic.file.fnum);
+ GEN_SET_FNUM(generic.in.file.fnum);
GEN_CALL(smb_raw_fileinfo(tree, current_op.mem_ctx, &parm[i]));
return cmp_fileinfo(instance, parm, status);
@@ -1778,7 +1778,7 @@ static BOOL handler_spathinfo(int instance)
union smb_setfileinfo parm[NSERVERS];
NTSTATUS status[NSERVERS];
- parm[0].generic.file.path = gen_fname_open(instance);
+ parm[0].generic.in.file.path = gen_fname_open(instance);
gen_setfileinfo(instance, &parm[0]);
@@ -1804,12 +1804,12 @@ static BOOL handler_sfileinfo(int instance)
union smb_setfileinfo parm[NSERVERS];
NTSTATUS status[NSERVERS];
- parm[0].generic.file.fnum = gen_fnum(instance);
+ parm[0].generic.in.file.fnum = gen_fnum(instance);
gen_setfileinfo(instance, &parm[0]);
GEN_COPY_PARM;
- GEN_SET_FNUM(generic.file.fnum);
+ GEN_SET_FNUM(generic.in.file.fnum);
GEN_CALL(smb_raw_setfileinfo(tree, &parm[i]));
return True;
@@ -1826,11 +1826,11 @@ static BOOL handler_notify(int instance)
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.file.fnum = gen_fnum(instance);
parm[0].notify.in.recursive = gen_bool();
GEN_COPY_PARM;
- GEN_SET_FNUM(notify.file.fnum);
+ GEN_SET_FNUM(notify.in.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 76728eb7b5..86e1eac59f 100644
--- a/source4/torture/nbench/nbio.c
+++ b/source4/torture/nbench/nbio.c
@@ -286,7 +286,7 @@ void nb_createx(const char *fname,
f = malloc_p(struct ftable);
f->handle = handle;
- f->fd = io.ntcreatex.file.fnum;
+ f->fd = io.ntcreatex.out.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.file.fnum = i;
+ io.writex.in.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.file.fnum = i;
+ io.write.in.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.file.fnum = i;
+ io.lockx.in.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.file.fnum = i;
+ io.lockx.in.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.file.fnum = i;
+ io.readx.in.file.fnum = i;
io.readx.in.offset = offset;
io.readx.in.mincnt = size;
io.readx.in.maxcnt = size;
@@ -465,7 +465,7 @@ void nb_close(int handle, NTSTATUS status)
i = find_handle(handle);
io.close.level = RAW_CLOSE_CLOSE;
- io.close.file.fnum = i;
+ io.close.in.file.fnum = i;
io.close.in.write_time = 0;
ret = smb_raw_close(c->tree, &io);
@@ -527,7 +527,7 @@ void nb_qpathinfo(const char *fname, int level, NTSTATUS status)
mem_ctx = talloc_init("nb_qpathinfo");
io.generic.level = level;
- io.generic.file.path = fname;
+ io.generic.in.file.path = fname;
ret = smb_raw_pathinfo(c->tree, mem_ctx, &io);
@@ -549,7 +549,7 @@ void nb_qfileinfo(int fnum, int level, NTSTATUS status)
mem_ctx = talloc_init("nb_qfileinfo");
io.generic.level = level;
- io.generic.file.fnum = i;
+ io.generic.in.file.fnum = i;
ret = smb_raw_fileinfo(c->tree, mem_ctx, &io);
@@ -574,7 +574,7 @@ void nb_sfileinfo(int fnum, int level, NTSTATUS status)
i = find_handle(fnum);
io.generic.level = level;
- io.generic.file.fnum = i;
+ io.generic.in.file.fnum = i;
unix_to_nt_time(&io.basic_info.in.create_time, time(NULL));
unix_to_nt_time(&io.basic_info.in.access_time, 0);
unix_to_nt_time(&io.basic_info.in.write_time, 0);
@@ -643,7 +643,7 @@ void nb_flush(int fnum, NTSTATUS status)
int i;
i = find_handle(fnum);
- io.flush.file.fnum = i;
+ io.flush.in.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 74aefa4af5..5583178f3e 100644
--- a/source4/torture/raw/acls.c
+++ b/source4/torture/raw/acls.c
@@ -69,10 +69,10 @@ 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.file.fnum;
+ fnum = io.ntcreatex.out.file.fnum;
q.query_secdesc.level = RAW_FILEINFO_SEC_DESC;
- q.query_secdesc.file.fnum = fnum;
+ q.query_secdesc.in.file.fnum = fnum;
q.query_secdesc.in.secinfo_flags =
SECINFO_OWNER |
SECINFO_GROUP |
@@ -94,7 +94,7 @@ static BOOL test_sd(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
CHECK_STATUS(status, NT_STATUS_OK);
set.set_secdesc.level = RAW_SFILEINFO_SEC_DESC;
- set.set_secdesc.file.fnum = fnum;
+ set.set_secdesc.in.file.fnum = fnum;
set.set_secdesc.in.secinfo_flags = q.query_secdesc.in.secinfo_flags;
set.set_secdesc.in.sd = sd;
@@ -177,12 +177,12 @@ 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.file.fnum;
+ fnum = io.ntcreatex.out.file.fnum;
printf("querying ACL\n");
q.query_secdesc.level = RAW_FILEINFO_SEC_DESC;
- q.query_secdesc.file.fnum = fnum;
+ q.query_secdesc.in.file.fnum = fnum;
q.query_secdesc.in.secinfo_flags =
SECINFO_OWNER |
SECINFO_GROUP |
@@ -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.file.fnum;
+ fnum = io.ntcreatex.out.file.fnum;
- q.query_secdesc.file.fnum = fnum;
+ q.query_secdesc.in.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.file.fnum = (_fnum); \
+ _q.access_information.in.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,11 +279,11 @@ 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.file.fnum;
+ fnum = io.ntcreatex.out.file.fnum;
printf("get the original sd\n");
q.query_secdesc.level = RAW_FILEINFO_SEC_DESC;
- q.query_secdesc.file.fnum = fnum;
+ q.query_secdesc.in.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);
@@ -301,7 +301,7 @@ static BOOL test_creator_sid(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
NULL);
set.set_secdesc.level = RAW_SFILEINFO_SEC_DESC;
- set.set_secdesc.file.fnum = fnum;
+ set.set_secdesc.in.file.fnum = fnum;
set.set_secdesc.in.secinfo_flags = SECINFO_DACL;
set.set_secdesc.in.sd = sd;
@@ -338,7 +338,7 @@ static BOOL test_creator_sid(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
NULL);
set.set_secdesc.level = RAW_SFILEINFO_SEC_DESC;
- set.set_secdesc.file.fnum = fnum;
+ set.set_secdesc.in.file.fnum = fnum;
set.set_secdesc.in.secinfo_flags = SECINFO_DACL;
set.set_secdesc.in.sd = sd;
status = smb_raw_setfileinfo(cli->tree, &set);
@@ -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.file.fnum,
+ CHECK_ACCESS_FLAGS(io.ntcreatex.out.file.fnum,
SEC_FILE_READ_DATA|
SEC_FILE_READ_ATTRIBUTE);
- smbcli_close(cli->tree, io.ntcreatex.file.fnum);
+ smbcli_close(cli->tree, io.ntcreatex.out.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.file.fnum,
+ CHECK_ACCESS_FLAGS(io.ntcreatex.out.file.fnum,
SEC_RIGHTS_FILE_READ);
- smbcli_close(cli->tree, io.ntcreatex.file.fnum);
+ smbcli_close(cli->tree, io.ntcreatex.out.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.file.fnum,
+ CHECK_ACCESS_FLAGS(io.ntcreatex.out.file.fnum,
SEC_FILE_READ_DATA |
SEC_FILE_READ_ATTRIBUTE);
- smbcli_close(cli->tree, io.ntcreatex.file.fnum);
+ smbcli_close(cli->tree, io.ntcreatex.out.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.file.fnum, SEC_RIGHTS_FILE_READ);
- smbcli_close(cli->tree, io.ntcreatex.file.fnum);
+ CHECK_ACCESS_FLAGS(io.ntcreatex.out.file.fnum, SEC_RIGHTS_FILE_READ);
+ smbcli_close(cli->tree, io.ntcreatex.out.file.fnum);
printf("put back original sd\n");
@@ -517,11 +517,11 @@ 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.file.fnum;
+ fnum = io.ntcreatex.out.file.fnum;
printf("get the original sd\n");
q.query_secdesc.level = RAW_FILEINFO_SEC_DESC;
- q.query_secdesc.file.fnum = fnum;
+ q.query_secdesc.in.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);
@@ -570,7 +570,7 @@ static BOOL test_generic_bits(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
NULL);
set.set_secdesc.level = RAW_SFILEINFO_SEC_DESC;
- set.set_secdesc.file.fnum = fnum;
+ set.set_secdesc.in.file.fnum = fnum;
set.set_secdesc.in.secinfo_flags = SECINFO_DACL | SECINFO_OWNER;
set.set_secdesc.in.sd = 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.file.fnum,
+ CHECK_ACCESS_FLAGS(io.ntcreatex.out.file.fnum,
expected_mask | file_mappings[i].specific_bits);
- smbcli_close(cli->tree, io.ntcreatex.file.fnum);
+ smbcli_close(cli->tree, io.ntcreatex.out.file.fnum);
if (!has_take_ownership_privilege) {
continue;
@@ -618,7 +618,7 @@ static BOOL test_generic_bits(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
NULL);
set.set_secdesc.level = RAW_SFILEINFO_SEC_DESC;
- set.set_secdesc.file.fnum = fnum;
+ set.set_secdesc.in.file.fnum = fnum;
set.set_secdesc.in.secinfo_flags = SECINFO_DACL | SECINFO_OWNER;
set.set_secdesc.in.sd = sd;
@@ -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.file.fnum,
+ CHECK_ACCESS_FLAGS(io.ntcreatex.out.file.fnum,
expected_mask_anon | file_mappings[i].specific_bits);
- smbcli_close(cli->tree, io.ntcreatex.file.fnum);
+ smbcli_close(cli->tree, io.ntcreatex.out.file.fnum);
}
printf("put back original sd\n");
@@ -679,11 +679,11 @@ 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.file.fnum;
+ fnum = io.ntcreatex.out.file.fnum;
printf("get the original sd\n");
q.query_secdesc.level = RAW_FILEINFO_SEC_DESC;
- q.query_secdesc.file.fnum = fnum;
+ q.query_secdesc.in.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);
@@ -710,7 +710,7 @@ static BOOL test_generic_bits(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
NULL);
set.set_secdesc.level = RAW_SFILEINFO_SEC_DESC;
- set.set_secdesc.file.fnum = fnum;
+ set.set_secdesc.in.file.fnum = fnum;
set.set_secdesc.in.secinfo_flags = SECINFO_DACL;
set.set_secdesc.in.sd = 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.file.fnum,
+ CHECK_ACCESS_FLAGS(io.ntcreatex.out.file.fnum,
expected_mask | dir_mappings[i].specific_bits);
- smbcli_close(cli->tree, io.ntcreatex.file.fnum);
+ smbcli_close(cli->tree, io.ntcreatex.out.file.fnum);
}
printf("put back original sd\n");
@@ -797,11 +797,11 @@ 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.file.fnum;
+ fnum = io.ntcreatex.out.file.fnum;
printf("get the original sd\n");
q.query_secdesc.level = RAW_FILEINFO_SEC_DESC;
- q.query_secdesc.file.fnum = fnum;
+ q.query_secdesc.in.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);
@@ -836,7 +836,7 @@ static BOOL test_owner_bits(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
NULL);
set.set_secdesc.level = RAW_SFILEINFO_SEC_DESC;
- set.set_secdesc.file.fnum = fnum;
+ set.set_secdesc.in.file.fnum = fnum;
set.set_secdesc.in.secinfo_flags = SECINFO_DACL;
set.set_secdesc.in.sd = 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.file.fnum, bit | SEC_FILE_READ_ATTRIBUTE);
- smbcli_close(cli->tree, io.ntcreatex.file.fnum);
+ CHECK_ACCESS_FLAGS(io.ntcreatex.out.file.fnum, bit | SEC_FILE_READ_ATTRIBUTE);
+ smbcli_close(cli->tree, io.ntcreatex.out.file.fnum);
} else {
CHECK_STATUS(status, NT_STATUS_ACCESS_DENIED);
}
@@ -1019,11 +1019,11 @@ 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.file.fnum;
+ fnum = io.ntcreatex.out.file.fnum;
printf("get the original sd\n");
q.query_secdesc.level = RAW_FILEINFO_SEC_DESC;
- q.query_secdesc.file.fnum = fnum;
+ q.query_secdesc.in.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);
@@ -1060,7 +1060,7 @@ static BOOL test_inheritance(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
0,
NULL);
set.set_secdesc.level = RAW_SFILEINFO_SEC_DESC;
- set.set_secdesc.file.fnum = fnum;
+ set.set_secdesc.in.file.fnum = fnum;
set.set_secdesc.in.secinfo_flags = SECINFO_DACL;
set.set_secdesc.in.sd = sd;
status = smb_raw_setfileinfo(cli->tree, &set);
@@ -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.file.fnum;
+ fnum2 = io.ntcreatex.out.file.fnum;
- q.query_secdesc.file.fnum = fnum2;
+ q.query_secdesc.in.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.file.fnum;
+ fnum2 = io.ntcreatex.out.file.fnum;
- q.query_secdesc.file.fnum = fnum2;
+ q.query_secdesc.in.file.fnum = fnum2;
status = smb_raw_fileinfo(cli->tree, mem_ctx, &q);
CHECK_STATUS(status, NT_STATUS_OK);
@@ -1193,7 +1193,7 @@ static BOOL test_inheritance(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
0,
NULL);
set.set_secdesc.level = RAW_SFILEINFO_SEC_DESC;
- set.set_secdesc.file.fnum = fnum;
+ set.set_secdesc.in.file.fnum = fnum;
set.set_secdesc.in.secinfo_flags = SECINFO_DACL;
set.set_secdesc.in.sd = sd;
status = smb_raw_setfileinfo(cli->tree, &set);
@@ -1205,10 +1205,10 @@ 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.file.fnum;
+ fnum2 = io.ntcreatex.out.file.fnum;
CHECK_ACCESS_FLAGS(fnum2, SEC_RIGHTS_FILE_ALL);
- q.query_secdesc.file.fnum = fnum2;
+ q.query_secdesc.in.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);
@@ -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.file.fnum;
+ fnum2 = io.ntcreatex.out.file.fnum;
smbcli_close(cli->tree, fnum2);
} else {
CHECK_STATUS(status, NT_STATUS_ACCESS_DENIED);
@@ -1241,13 +1241,13 @@ 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.file.fnum;
+ fnum2 = io.ntcreatex.out.file.fnum;
CHECK_ACCESS_FLAGS(fnum2, SEC_FILE_WRITE_DATA | SEC_FILE_READ_ATTRIBUTE);
smbcli_close(cli->tree, fnum2);
printf("put back original sd\n");
set.set_secdesc.level = RAW_SFILEINFO_SEC_DESC;
- set.set_secdesc.file.fnum = fnum;
+ set.set_secdesc.in.file.fnum = fnum;
set.set_secdesc.in.secinfo_flags = SECINFO_DACL;
set.set_secdesc.in.sd = sd_orig;
status = smb_raw_setfileinfo(cli->tree, &set);
@@ -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.file.fnum;
+ fnum2 = io.ntcreatex.out.file.fnum;
CHECK_ACCESS_FLAGS(fnum2, SEC_FILE_WRITE_DATA | SEC_FILE_READ_ATTRIBUTE);
smbcli_close(cli->tree, fnum2);
@@ -1271,7 +1271,7 @@ static BOOL test_inheritance(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
done:
set.set_secdesc.level = RAW_SFILEINFO_SEC_DESC;
- set.set_secdesc.file.fnum = fnum;
+ set.set_secdesc.in.file.fnum = fnum;
set.set_secdesc.in.secinfo_flags = SECINFO_DACL;
set.set_secdesc.in.sd = sd_orig;
status = smb_raw_setfileinfo(cli->tree, &set);
@@ -1318,11 +1318,11 @@ 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.file.fnum;
+ fnum = io.ntcreatex.out.file.fnum;
printf("get the original sd\n");
q.query_secdesc.level = RAW_FILEINFO_SEC_DESC;
- q.query_secdesc.file.fnum = fnum;
+ q.query_secdesc.in.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);
@@ -1342,7 +1342,7 @@ static BOOL test_inheritance_dynamic(struct smbcli_state *cli, TALLOC_CTX *mem_c
sd->type |= SEC_DESC_DACL_AUTO_INHERITED | SEC_DESC_DACL_AUTO_INHERIT_REQ;
set.set_secdesc.level = RAW_SFILEINFO_SEC_DESC;
- set.set_secdesc.file.fnum = fnum;
+ set.set_secdesc.in.file.fnum = fnum;
set.set_secdesc.in.secinfo_flags = SECINFO_DACL;
set.set_secdesc.in.sd = sd;
status = smb_raw_setfileinfo(cli->tree, &set);
@@ -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.file.fnum;
+ fnum2 = io.ntcreatex.out.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.file.fnum;
+ fnum2 = io.ntcreatex.out.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.file.fnum;
+ fnum2 = io.ntcreatex.out.file.fnum;
smbcli_close(cli->tree, fnum2);
@@ -1409,7 +1409,7 @@ static BOOL test_inheritance_dynamic(struct smbcli_state *cli, TALLOC_CTX *mem_c
done:
printf("put back original sd\n");
set.set_secdesc.level = RAW_SFILEINFO_SEC_DESC;
- set.set_secdesc.file.fnum = fnum;
+ set.set_secdesc.in.file.fnum = fnum;
set.set_secdesc.in.secinfo_flags = SECINFO_DACL;
set.set_secdesc.in.sd = sd_orig;
status = smb_raw_setfileinfo(cli->tree, &set);
diff --git a/source4/torture/raw/close.c b/source4/torture/raw/close.c
index 8a82a46acc..bfc3127b2e 100644
--- a/source4/torture/raw/close.c
+++ b/source4/torture/raw/close.c
@@ -65,7 +65,7 @@ BOOL torture_raw_close(void)
REOPEN;
io.close.level = RAW_CLOSE_CLOSE;
- io.close.file.fnum = fnum;
+ io.close.in.file.fnum = fnum;
io.close.in.write_time = basetime;
status = smb_raw_close(cli->tree, &io);
CHECK_STATUS(status, NT_STATUS_OK);
@@ -77,7 +77,7 @@ BOOL torture_raw_close(void)
/* the file should have the write time set */
finfo.generic.level = RAW_FILEINFO_ALL_INFO;
- finfo.generic.file.path = fname;
+ finfo.generic.in.file.path = fname;
status = smb_raw_pathinfo(cli->tree, mem_ctx, &finfo);
CHECK_STATUS(status, NT_STATUS_OK);
@@ -108,19 +108,19 @@ BOOL torture_raw_close(void)
REOPEN;
finfo2.generic.level = RAW_FILEINFO_ALL_INFO;
- finfo2.generic.file.path = fname;
+ finfo2.generic.in.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.file.fnum = fnum;
+ io.close.in.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.level = RAW_FILEINFO_ALL_INFO;
- finfo.generic.file.path = fname;
+ finfo.generic.in.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.file.fnum = fnum;
+ io.splclose.in.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.flush.file.fnum = fnum;
+ io_flush.flush.in.file.fnum = fnum;
status = smb_raw_flush(cli->tree, &io_flush);
CHECK_STATUS(status, NT_STATUS_INVALID_HANDLE);
- io_flush.flush.file.fnum = 0xffff;
+ io_flush.flush.in.file.fnum = 0xffff;
status = smb_raw_flush(cli->tree, &io_flush);
CHECK_STATUS(status, NT_STATUS_OK);
REOPEN;
- io_flush.flush.file.fnum = fnum;
+ io_flush.flush.in.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.flush.file.fnum = fnum;
+ io_flush.flush.in.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 ebd3a3857f..bfcd2473e3 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.file.fnum;
+ fnum = io.ntcreatex.out.file.fnum;
printf("write using the old vuid\n");
wr.generic.level = RAW_WRITE_WRITEX;
- wr.writex.file.fnum = fnum;
+ wr.writex.in.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.file.fnum = fnum;
+ cl.close.in.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.file.fnum;
+ fnum = io.ntcreatex.out.file.fnum;
printf("write using the old tid\n");
wr.generic.level = RAW_WRITE_WRITEX;
- wr.writex.file.fnum = fnum;
+ wr.writex.in.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.file.fnum = fnum;
+ cl.close.in.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.file.fnum;
+ fnum = io.ntcreatex.out.file.fnum;
printf("write using the old pid\n");
cli->session->pid = pid1;
wr.generic.level = RAW_WRITE_WRITEX;
- wr.writex.file.fnum = fnum;
+ wr.writex.in.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.file.fnum = fnum;
+ cl.close.in.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 8ef489a736..a636f8e1cd 100644
--- a/source4/torture/raw/eas.c
+++ b/source4/torture/raw/eas.c
@@ -72,13 +72,13 @@ 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.file.fnum;
+ fnum = io.ntcreatex.out.file.fnum;
ret &= check_ea(cli, fname, "EAONE", NULL);
printf("Adding first two EAs\n");
setfile.generic.level = RAW_SFILEINFO_EA_SET;
- setfile.generic.file.fnum = fnum;
+ setfile.generic.in.file.fnum = fnum;
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;
@@ -153,7 +153,7 @@ static int test_one_eamax(struct smbcli_state *cli, const int fnum,
int i, high, low, maxeasize;
setfile.generic.level = RAW_SFILEINFO_EA_SET;
- setfile.generic.file.fnum = fnum;
+ setfile.generic.in.file.fnum = fnum;
setfile.ea_set.in.num_eas = 1;
setfile.ea_set.in.eas = &eastruct;
setfile.ea_set.in.eas->flags = 0;
@@ -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.file.fnum;
+ fnum = io.ntcreatex.out.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.file.fnum;
+ fnum = io.ntcreatex.out.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.file.fnum;
+ fnum = io.ntcreatex.out.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 c0df9b77f0..8631d8efb4 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.file.fnum = fnum;
+ ctl.ioctl.in.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.file.fnum = fnum;
+ ctl.ioctl.in.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.file.fnum = fnum+1;
+ ctl.ioctl.in.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.file.fnum = fnum;
+ nt.ntioctl.in.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.file.fnum = fnum;
+ nt.ntioctl.in.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.file.fnum = fnum+1;
+ nt.ntioctl.in.file.fnum = fnum+1;
status = smb_raw_ioctl(cli->tree, mem_ctx, &nt);
CHECK_STATUS(status, NT_STATUS_INVALID_HANDLE);
#if 0
- nt.ntioctl.file.fnum = fnum;
+ nt.ntioctl.in.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 bccb17d714..ae29cae4a7 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.file.fnum = fnum;
+ io.lock.in.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.file.fnum = fnum;
+ io.lock.in.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.file.fnum = fnum;
+ io.lock.in.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.file.fnum = fnum;
+ io.lock.in.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.file.fnum = fnum;
+ io.lock.in.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.file.fnum = fnum;
+ io.lock.in.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.file.fnum = fnum;
+ io.lockx.in.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.file.fnum = fnum;
+ io.lockx.in.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.file.fnum = fnum;
+ io.lockx.in.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.file.fnum = fnum;
+ io.lockx.in.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 6cf3634f11..98872bb9e3 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.file.fnum;
+ fnum1 = io.ntcreatex.out.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.file.fnum;
+ fnum2 = io.ntcreatex.out.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.file.fnum);
+ smbcli_close(cli->tree, io.ntcreatex.out.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.file.fnum = fnum;
+ io.writex.in.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.file.fnum = fnum;
+ io.lockx.in.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.file.fnum = fnum;
+ io.lockx.in.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 766c5374a9..378b46d018 100644
--- a/source4/torture/raw/notify.c
+++ b/source4/torture/raw/notify.c
@@ -94,16 +94,16 @@ BOOL torture_raw_notify(void)
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.ntcreatex.file.fnum;
+ fnum = io.ntcreatex.out.file.fnum;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum2 = io.ntcreatex.file.fnum;
+ fnum2 = io.ntcreatex.out.file.fnum;
/* ask for a change notify */
notify.notify.in.buffer_size = 1000;
notify.notify.in.completion_filter = 0x3;
- notify.notify.file.fnum = fnum;
+ notify.notify.in.file.fnum = fnum;
notify.notify.in.recursive = True;
printf("testing notify mkdir\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.notify.file.fnum = fnum2;
+ notify.notify.in.file.fnum = fnum2;
req2 = smb_raw_changenotify_send(cli->tree, &notify);
/* whereas this notify will see the above buffered events as
well */
- notify.notify.file.fnum = fnum;
+ notify.notify.in.file.fnum = fnum;
req = smb_raw_changenotify_send(cli->tree, &notify);
status = smbcli_unlink(cli->tree, BASEDIR "\\test0.txt");
@@ -202,7 +202,7 @@ BOOL torture_raw_notify(void)
CHECK_VAL(notify.notify.out.changes[i].action, NOTIFY_ACTION_REMOVED);
}
- notify.notify.file.fnum = fnum2;
+ notify.notify.in.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);
diff --git a/source4/torture/raw/open.c b/source4/torture/raw/open.c
index 06b78a547c..17afe4b4e0 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.file.path = fname; \
+ finfo.all_info.in.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.file.path = fname; \
+ finfo.all_info.in.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.file.path = fname; \
+ finfo.all_info.in.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.path = fname; \
+ sfinfo.generic.in.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.file.fnum;
+ fnum = io.openold.out.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.file.fnum;
+ fnum = io.openold.out.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.file.fnum;
+ fnum2 = io.openold.out.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.file.fnum;
+ fnum = io.openold.out.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.file.fnum;
+ fnum = io.openold.out.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.file.fnum;
+ fnum = io.openold.out.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.file.fnum;
+ fnum = io.openold.out.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.file.fnum;
+ fnum2 = io.openold.out.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.file.fnum;
+ fnum = io.openold.out.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.file.fnum);
+ smbcli_close(cli->tree, io.openx.out.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.file.fnum;
+ fnum = io.openx.out.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.file.fnum;
+ fnum = io.openx.out.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.file.fnum);
+ smbcli_close(cli->tree, io.openx.out.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.file.fnum);
+ smbcli_close(cli->tree, io.openx.out.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.file.fnum);
+ smbcli_close(cli->tree, io.openx.out.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.file.fnum;
+ fnum = io.openx.out.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.file.fnum);
+ smbcli_close(cli->tree, io.openx.out.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.file.fnum);
+ smbcli_close(cli->tree, io.openx.out.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.file.fnum, RDWR_RDONLY);
- smbcli_close(cli->tree, io.openx.file.fnum);
+ CHECK_RDWR(io.openx.out.file.fnum, RDWR_RDONLY);
+ smbcli_close(cli->tree, io.openx.out.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.file.fnum);
+ smbcli_close(cli->tree, io.t2open.out.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.file.fnum;
+ fnum = io.t2open.out.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.file.fnum);
+ smbcli_close(cli->tree, io.t2open.out.file.fnum);
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- smbcli_close(cli->tree, io.t2open.file.fnum);
+ smbcli_close(cli->tree, io.t2open.out.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.file.fnum);
+ smbcli_close(cli->tree, io.ntcreatex.out.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.file.fnum;
+ fnum = io.ntcreatex.out.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.file.fnum;
+ fnum = io.ntcreatex.out.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.file.fnum;
+ fnum = io.ntcreatex.out.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.file.fnum);
+ smbcli_close(cli->tree, io.ntcreatex.out.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.file.fnum;
+ fnum = io.ntcreatex.out.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.file.fnum;
+ fnum = io.ntcreatex.out.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.file.fnum;
+ fnum = io.ntcreatex.out.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.file.fnum = io.ntcreatex.file.fnum;
+ io2.lockx.in.file.fnum = io.ntcreatex.out.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.file.fnum);
- smbcli_close(cli->tree, io1.ntcreatex.file.fnum);
+ smbcli_close(cli->tree, io.ntcreatex.out.file.fnum);
+ smbcli_close(cli->tree, io1.ntcreatex.out.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.file.fnum;
+ fnum = io.mknew.out.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.file.fnum;
+ fnum = io.mknew.out.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.file.fnum;
+ fnum = io.mknew.out.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.file.fnum;
+ fnum = io.create.out.file.fnum;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- smbcli_close(cli->tree, io.create.file.fnum);
+ smbcli_close(cli->tree, io.create.out.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.file.fnum;
+ fnum = io.create.out.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.file.fnum;
+ fnum = io.create.out.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.file.fnum;
+ fnum = io.ctemp.out.file.fnum;
name = io.ctemp.out.name;
finfo.generic.level = RAW_FILEINFO_NAME_INFO;
- finfo.generic.file.fnum = fnum;
+ finfo.generic.in.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.file.fnum;
+ fnum = io.openxreadx.out.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 3d804f8572..65a72818cf 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.file.fnum = fnum;
+ io.close.in.file.fnum = fnum;
io.close.in.write_time = 0;
req = smb_raw_close_send(tree, &io);
if (req == NULL) {
@@ -141,7 +141,7 @@ 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.file.fnum;
+ fnum = io.ntcreatex.out.file.fnum;
CHECK_VAL(io.ntcreatex.out.oplock_level, EXCLUSIVE_OPLOCK_RETURN);
printf("unlink it - should be no break\n");
@@ -164,7 +164,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.file.fnum;
+ fnum = io.ntcreatex.out.file.fnum;
CHECK_VAL(io.ntcreatex.out.oplock_level, BATCH_OPLOCK_RETURN);
printf("unlink should generate a break\n");
@@ -188,7 +188,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.file.fnum;
+ fnum = io.ntcreatex.out.file.fnum;
CHECK_VAL(io.ntcreatex.out.oplock_level, BATCH_OPLOCK_RETURN);
unl.unlink.in.pattern = fname;
@@ -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.file.fnum;
+ fnum = io.ntcreatex.out.file.fnum;
CHECK_VAL(io.ntcreatex.out.oplock_level, BATCH_OPLOCK_RETURN);
rd.read.level = RAW_READ_READ;
- rd.read.file.fnum = fnum;
+ rd.read.in.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.file.fnum;
+ fnum = io.ntcreatex.out.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.file.fnum;
+ fnum2 = io.ntcreatex.out.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.file.fnum;
+ fnum = io.ntcreatex.out.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.file.fnum;
+ fnum = io.ntcreatex.out.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.file.fnum;
+ fnum2 = io.ntcreatex.out.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.file.fnum;
+ fnum = io.ntcreatex.out.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.file.fnum;
+ fnum2 = io.ntcreatex.out.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.file.fnum;
+ fnum2 = io.ntcreatex.out.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.file.fnum = fnum2;
+ wr.write.in.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.file.fnum = fnum2;
+ wr.write.in.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.file.fnum;
+ fnum = io.ntcreatex.out.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.file.fnum;
+ fnum2 = io.ntcreatex.out.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.file.fnum = fnum;
+ wr.write.in.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.file.fnum = fnum;
+ wr.write.in.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 bd5208db28..8f248cac04 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.file.fnum = fnum;
+ levels[i].fnum_finfo.generic.in.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.file.path = talloc_strdup(mem_ctx, fname);
+ levels[i].fname_finfo.generic.in.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 d41f0a025d..424d2f486a 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.file.fnum = fnum;
+ io.read.in.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.file.fnum = fnum+1;
+ io.read.in.file.fnum = fnum+1;
status = smb_raw_read(cli->tree, &io);
CHECK_STATUS(status, NT_STATUS_INVALID_HANDLE);
- io.read.file.fnum = fnum;
+ io.read.in.file.fnum = fnum;
smbcli_write(cli->tree, fnum, 0, test_data, 0, strlen(test_data));
printf("Trying small read\n");
- io.read.file.fnum = fnum;
+ io.read.in.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.file.fnum = fnum;
+ io.lockread.in.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.file.fnum = fnum+1;
+ io.lockread.in.file.fnum = fnum+1;
status = smb_raw_read(cli->tree, &io);
CHECK_STATUS(status, NT_STATUS_INVALID_HANDLE);
- io.lockread.file.fnum = fnum;
+ io.lockread.in.file.fnum = fnum;
smbcli_write(cli->tree, fnum, 0, test_data, 0, strlen(test_data));
printf("Trying small read\n");
- io.lockread.file.fnum = fnum;
+ io.lockread.in.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.file.fnum = fnum;
+ io.readx.in.file.fnum = fnum;
io.readx.in.mincnt = 1;
io.readx.in.maxcnt = 1;
io.readx.in.offset = 0;
@@ -401,15 +401,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.file.fnum = fnum+1;
+ io.readx.in.file.fnum = fnum+1;
status = smb_raw_read(cli->tree, &io);
CHECK_STATUS(status, NT_STATUS_INVALID_HANDLE);
- io.readx.file.fnum = fnum;
+ io.readx.in.file.fnum = fnum;
smbcli_write(cli->tree, fnum, 0, test_data, 0, strlen(test_data));
printf("Trying small read\n");
- io.readx.file.fnum = fnum;
+ io.readx.in.file.fnum = fnum;
io.readx.in.offset = 0;
io.readx.in.remaining = 0;
io.readx.in.read_for_execute = False;
@@ -573,7 +573,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.file.fnum = fnum;
+ io.readbraw.in.file.fnum = fnum;
io.readbraw.in.mincnt = 1;
io.readbraw.in.maxcnt = 1;
io.readbraw.in.offset = 0;
@@ -592,16 +592,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.file.fnum = fnum+1;
+ io.readbraw.in.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.file.fnum = fnum;
+ io.readbraw.in.file.fnum = fnum;
smbcli_write(cli->tree, fnum, 0, test_data, 0, strlen(test_data));
printf("Trying small read\n");
- io.readbraw.file.fnum = fnum;
+ io.readbraw.in.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 c84621b2be..c669f5fb2f 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.file.fnum;
+ fnum = op.ntcreatex.out.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.file.fnum;
+ fnum = op.ntcreatex.out.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.file.path = fname2;
+ finfo.generic.in.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.file.path = fname1;
+ finfo.generic.in.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.file.path = fname1;
+ finfo.generic.in.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.file.path = fname1;
+ finfo.generic.in.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.file.path = fname2;
+ finfo.generic.in.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.file.path = fname2;
+ finfo.generic.in.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.file.path = fname1;
+ finfo.generic.in.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.file.path = fname1;
+ finfo.generic.in.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 b601281bb8..3707287c12 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.file.path = fname;
+ all_info.generic.in.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.file.path = fname;
+ alt_info.generic.in.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.file.path = fname;
+ internal_info.generic.in.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.file.path = fname;
+ name_info.generic.in.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));
@@ -813,7 +813,7 @@ static BOOL test_modify_search(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
torture_set_file_attribute(cli->tree, BASEDIR "\\T017-17.txt", FILE_ATTRIBUTE_SYSTEM);
torture_set_file_attribute(cli->tree, BASEDIR "\\T018-18.txt", 0);
sfinfo.generic.level = RAW_SFILEINFO_DISPOSITION_INFORMATION;
- sfinfo.generic.file.fnum = fnum;
+ sfinfo.generic.in.file.fnum = fnum;
sfinfo.disposition_info.in.delete_on_close = 1;
status = smb_raw_setfileinfo(cli->tree, &sfinfo);
CHECK_STATUS(status, NT_STATUS_OK);
@@ -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.path = BASEDIR "\\file2.txt";
+ setfile.generic.in.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.path = BASEDIR "\\file3.txt";
+ setfile.generic.in.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 affb4ebb34..366d0a45dc 100644
--- a/source4/torture/raw/seek.c
+++ b/source4/torture/raw/seek.c
@@ -68,17 +68,17 @@ static BOOL test_seek(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
}
finfo.generic.level = RAW_FILEINFO_POSITION_INFORMATION;
- finfo.position_information.file.fnum = fnum;
+ finfo.position_information.in.file.fnum = fnum;
printf("Trying bad handle\n");
- io.lseek.file.fnum = fnum+1;
+ io.lseek.in.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.lseek.file.fnum = fnum;
+ io.lseek.in.file.fnum = fnum;
io.lseek.in.mode = SEEK_MODE_START;
io.lseek.in.offset = 17;
status = smb_raw_seek(cli->tree, &io);
@@ -89,7 +89,7 @@ static BOOL test_seek(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
CHECK_VALUE(finfo.position_information.out.position, 0);
printf("Trying relative seek\n");
- io.lseek.file.fnum = fnum;
+ io.lseek.in.file.fnum = fnum;
io.lseek.in.mode = SEEK_MODE_CURRENT;
io.lseek.in.offset = -3;
status = smb_raw_seek(cli->tree, &io);
@@ -97,19 +97,19 @@ static BOOL test_seek(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
CHECK_VALUE(io.lseek.out.offset, 14);
printf("Trying end seek\n");
- io.lseek.file.fnum = fnum;
+ io.lseek.in.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.file.fnum = fnum;
+ finfo.all_info.in.file.fnum = fnum;
status = smb_raw_fileinfo(cli->tree, mem_ctx, &finfo);
CHECK_STATUS(status, NT_STATUS_OK);
CHECK_VALUE(io.lseek.out.offset, finfo.all_info.out.size);
printf("Trying max seek\n");
- io.lseek.file.fnum = fnum;
+ io.lseek.in.file.fnum = fnum;
io.lseek.in.mode = SEEK_MODE_START;
io.lseek.in.offset = -1;
status = smb_raw_seek(cli->tree, &io);
@@ -118,13 +118,13 @@ 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.file.fnum = fnum;
+ finfo.position_information.in.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.lseek.file.fnum = fnum;
+ io.lseek.in.file.fnum = fnum;
io.lseek.in.mode = SEEK_MODE_CURRENT;
io.lseek.in.offset = 1000;
status = smb_raw_seek(cli->tree, &io);
@@ -133,7 +133,7 @@ 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.file.fnum = fnum;
+ finfo.position_information.in.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,12 +148,12 @@ 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.file.fnum = fnum;
+ finfo.position_information.in.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.lseek.file.fnum = fnum;
+ io.lseek.in.file.fnum = fnum;
io.lseek.in.mode = SEEK_MODE_CURRENT;
io.lseek.in.offset = 0;
status = smb_raw_seek(cli->tree, &io);
@@ -168,7 +168,7 @@ 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.file.fnum = fnum;
+ finfo.position_information.in.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);
@@ -185,19 +185,19 @@ static BOOL test_seek(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
goto done;
}
sfinfo.generic.level = RAW_SFILEINFO_POSITION_INFORMATION;
- sfinfo.position_information.file.fnum = fnum2;
+ sfinfo.position_information.in.file.fnum = fnum2;
sfinfo.position_information.in.position = 25;
status = smb_raw_setfileinfo(cli->tree, &sfinfo);
CHECK_STATUS(status, NT_STATUS_OK);
finfo.generic.level = RAW_FILEINFO_POSITION_INFORMATION;
- finfo.position_information.file.fnum = fnum2;
+ finfo.position_information.in.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.file.fnum = fnum;
+ finfo.position_information.in.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.path = fname;
+ sfinfo.position_information.in.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.file.fnum = fnum2;
+ finfo.position_information.in.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.file.path = fname;
+ finfo.position_information.in.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 d67825925b..a48fa237aa 100644
--- a/source4/torture/raw/setfileinfo.c
+++ b/source4/torture/raw/setfileinfo.c
@@ -85,7 +85,7 @@ BOOL torture_raw_sfileinfo(void)
check_fnum = True; \
call_name = #call; \
sfinfo.generic.level = RAW_SFILEINFO_ ## call; \
- sfinfo.generic.file.fnum = fnum; \
+ sfinfo.generic.in.file.fnum = fnum; \
status = smb_raw_setfileinfo(cli->tree, &sfinfo); \
if (!NT_STATUS_EQUAL(status, rightstatus)) { \
printf("(%s) %s - %s (should be %s)\n", __location__, #call, \
@@ -93,7 +93,7 @@ BOOL torture_raw_sfileinfo(void)
ret = False; \
} \
finfo1.generic.level = RAW_FILEINFO_ALL_INFO; \
- finfo1.generic.file.fnum = fnum; \
+ finfo1.generic.in.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.path = path_fname; \
+ sfinfo.generic.in.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.path = path_fname_new; \
+ sfinfo.generic.in.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.file.path = path_fname; \
+ finfo1.generic.in.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.file.path = path_fname_new; \
+ finfo1.generic.in.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.file.fnum = fnum; \
+ finfo2.generic.in.file.fnum = fnum; \
status2 = smb_raw_fileinfo(cli->tree, mem_ctx, &finfo2); \
} else { \
- finfo2.generic.file.path = path_fname; \
+ finfo2.generic.in.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.file.path = path_fname_new; \
+ finfo2.generic.in.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.path = fname;
+ sfinfo.generic.in.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 798cc61171..2557724fe3 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.file.fnum;
+ fnum = io.ntcreatex.out.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.file.fnum);
+ smbcli_close(cli->tree, io.ntcreatex.out.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.file.fnum;
+ fnum = io.ntcreatex.out.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.file.fnum;
+ fnum = io.ntcreatex.out.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.file.fnum;
+ fnum = io.ntcreatex.out.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 398884043e..2e5111803c 100644
--- a/source4/torture/raw/unlink.c
+++ b/source4/torture/raw/unlink.c
@@ -198,7 +198,7 @@ static BOOL test_delete_on_close(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
fnum = create_complex_file(cli, mem_ctx, fname);
sfinfo.disposition_info.level = RAW_SFILEINFO_DISPOSITION_INFO;
- sfinfo.disposition_info.file.fnum = fnum;
+ sfinfo.disposition_info.in.file.fnum = fnum;
sfinfo.disposition_info.in.delete_on_close = 0;
status = smb_raw_setfileinfo(cli->tree, &sfinfo);
CHECK_STATUS(status, NT_STATUS_OK);
@@ -210,7 +210,7 @@ static BOOL test_delete_on_close(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
printf("Testing with delete_on_close 1\n");
fnum = create_complex_file(cli, mem_ctx, fname);
- sfinfo.disposition_info.file.fnum = fnum;
+ sfinfo.disposition_info.in.file.fnum = fnum;
sfinfo.disposition_info.in.delete_on_close = 1;
status = smb_raw_setfileinfo(cli->tree, &sfinfo);
CHECK_STATUS(status, NT_STATUS_OK);
@@ -226,7 +226,7 @@ static BOOL test_delete_on_close(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
CHECK_STATUS(status, NT_STATUS_OK);
sfinfo.disposition_info.level = RAW_SFILEINFO_DISPOSITION_INFO;
- sfinfo.disposition_info.file.fnum = fnum;
+ sfinfo.disposition_info.in.file.fnum = fnum;
sfinfo.disposition_info.in.delete_on_close = 0;
status = smb_raw_setfileinfo(cli->tree, &sfinfo);
CHECK_STATUS(status, NT_STATUS_OK);
@@ -240,7 +240,7 @@ static BOOL test_delete_on_close(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
status = create_directory_handle(cli->tree, dname, &fnum);
CHECK_STATUS(status, NT_STATUS_OK);
- sfinfo.disposition_info.file.fnum = fnum;
+ sfinfo.disposition_info.in.file.fnum = fnum;
sfinfo.disposition_info.in.delete_on_close = 1;
status = smb_raw_setfileinfo(cli->tree, &sfinfo);
CHECK_STATUS(status, NT_STATUS_OK);
@@ -257,16 +257,16 @@ static BOOL test_delete_on_close(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
fnum2 = create_complex_file(cli, mem_ctx, inside);
- sfinfo.disposition_info.file.fnum = fnum;
+ sfinfo.disposition_info.in.file.fnum = fnum;
sfinfo.disposition_info.in.delete_on_close = 1;
status = smb_raw_setfileinfo(cli->tree, &sfinfo);
CHECK_STATUS(status, NT_STATUS_DIRECTORY_NOT_EMPTY);
- sfinfo.disposition_info.file.fnum = fnum2;
+ sfinfo.disposition_info.in.file.fnum = fnum2;
status = smb_raw_setfileinfo(cli->tree, &sfinfo);
CHECK_STATUS(status, NT_STATUS_OK);
- sfinfo.disposition_info.file.fnum = fnum;
+ sfinfo.disposition_info.in.file.fnum = fnum;
status = smb_raw_setfileinfo(cli->tree, &sfinfo);
CHECK_STATUS(status, NT_STATUS_DIRECTORY_NOT_EMPTY);
@@ -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.file.fnum;
+ fnum = op.ntcreatex.out.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.file.fnum;
+ fnum2 = op.ntcreatex.out.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.file.fnum;
+ fnum = op.ntcreatex.out.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.file.fnum;
+ fnum2 = op.ntcreatex.out.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 e9a391a7dc..894c9de08d 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.file.path = fname; \
+ finfo.all_info.in.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.file.fnum = fnum;
+ io.write.in.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.file.fnum = fnum+1;
+ io.write.in.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.file.fnum = fnum;
+ io.write.in.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.file.fnum = fnum;
+ io.writex.in.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.file.fnum = fnum+1;
+ io.writex.in.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.file.fnum = fnum;
+ io.writex.in.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.file.fnum = fnum;
+ io.writex.in.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.file.fnum = fnum;
+ io.writex.in.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.file.fnum = fnum;
+ io.writeunlock.in.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.file.fnum = fnum+1;
+ io.writeunlock.in.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.file.fnum = fnum;
+ io.writeunlock.in.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.file.fnum = fnum;
+ io.writeclose.in.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.file.fnum = fnum;
+ io.writeclose.in.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.file.fnum = fnum;
+ io.writeclose.in.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.file.fnum = fnum;
+ io.writeclose.in.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.file.fnum = fnum+1;
+ io.writeclose.in.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.file.fnum = fnum;
+ io.writeclose.in.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.file.fnum = fnum;
+ io.writeclose.in.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 2e1c9f8814..19e41fdc7e 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.file.handle = handle;
+ io.generic.in.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.file.handle = handle;
+ io.generic.in.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 450c51be76..f52025c702 100644
--- a/source4/torture/smb2/getinfo.c
+++ b/source4/torture/smb2/getinfo.c
@@ -109,13 +109,13 @@ static BOOL torture_smb2_fileinfo(struct smb2_tree *tree)
SMB2_CONTINUE_FLAG_RESTART;
}
file_levels[i].finfo.generic.level = file_levels[i].level;
- file_levels[i].finfo.generic.file.handle = hfile;
+ file_levels[i].finfo.generic.in.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.file.handle = hdir;
+ file_levels[i].dinfo.generic.in.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 bf8c8dad01..e046d70acf 100644
--- a/source4/torture/smb2/setinfo.c
+++ b/source4/torture/smb2/setinfo.c
@@ -76,7 +76,7 @@ BOOL torture_smb2_setinfo(void)
#define CHECK_CALL(call, rightstatus) do { \
call_name = #call; \
sfinfo.generic.level = RAW_SFILEINFO_ ## call; \
- sfinfo.generic.file.handle = handle; \
+ sfinfo.generic.in.file.handle = handle; \
status = smb2_setinfo_file(tree, &sfinfo); \
if (!NT_STATUS_EQUAL(status, rightstatus)) { \
printf("(%s) %s - %s (should be %s)\n", __location__, #call, \
@@ -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.file.handle = handle; \
+ finfo2.generic.in.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 9be9b07c5b..84a35900a3 100644
--- a/source4/torture/smb2/util.c
+++ b/source4/torture/smb2/util.c
@@ -144,7 +144,7 @@ static NTSTATUS smb2_create_complex(struct smb2_tree *tree, const char *fname,
/* make sure all the timestamps aren't the same, and are also
in different DST zones*/
setfile.generic.level = RAW_SFILEINFO_BASIC_INFORMATION;
- setfile.generic.file.handle = *handle;
+ setfile.generic.in.file.handle = *handle;
setfile.basic_info.in.create_time = t + 9*30*24*60*60;
setfile.basic_info.in.access_time = t + 6*30*24*60*60;
@@ -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.file.handle = *handle;
+ fileinfo.generic.in.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.file.handle = handle;
+ io.generic.in.file.handle = handle;
status = smb2_getinfo_file(tree, tmp_ctx, &io);
if (!NT_STATUS_IS_OK(status)) {
diff --git a/source4/torture/torture.c b/source4/torture/torture.c
index 9598e1ea2e..7e96196096 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.file.fnum = fnum;
+ parms.ioctl.in.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 801c4b1e59..e66fcde758 100644
--- a/source4/torture/torture_util.c
+++ b/source4/torture/torture_util.c
@@ -68,7 +68,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.file.fnum;
+ *fnum = io.ntcreatex.out.file.fnum;
}
return status;
@@ -104,7 +104,7 @@ int create_complex_file(struct smbcli_state *cli, TALLOC_CTX *mem_ctx, const cha
if (strchr(fname, ':') == NULL) {
/* setup some EAs */
setfile.generic.level = RAW_SFILEINFO_EA_SET;
- setfile.generic.file.fnum = fnum;
+ setfile.generic.in.file.fnum = fnum;
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;
@@ -122,7 +122,7 @@ int create_complex_file(struct smbcli_state *cli, TALLOC_CTX *mem_ctx, const cha
/* make sure all the timestamps aren't the same, and are also
in different DST zones*/
setfile.generic.level = RAW_SFILEINFO_SETATTRE;
- setfile.generic.file.fnum = fnum;
+ setfile.generic.in.file.fnum = fnum;
setfile.setattre.in.create_time = t + 9*30*24*60*60;
setfile.setattre.in.access_time = t + 6*30*24*60*60;
@@ -135,7 +135,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.file.fnum = fnum;
+ fileinfo.generic.in.file.fnum = fnum;
status = smb_raw_fileinfo(cli->tree, mem_ctx, &fileinfo);
if (!NT_STATUS_IS_OK(status)) {
@@ -181,7 +181,7 @@ int create_complex_dir(struct smbcli_state *cli, TALLOC_CTX *mem_ctx, const char
if (strchr(dname, ':') == NULL) {
/* setup some EAs */
setfile.generic.level = RAW_SFILEINFO_EA_SET;
- setfile.generic.file.fnum = fnum;
+ setfile.generic.in.file.fnum = fnum;
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;
@@ -199,7 +199,7 @@ int create_complex_dir(struct smbcli_state *cli, TALLOC_CTX *mem_ctx, const char
/* make sure all the timestamps aren't the same, and are also
in different DST zones*/
setfile.generic.level = RAW_SFILEINFO_SETATTRE;
- setfile.generic.file.fnum = fnum;
+ setfile.generic.in.file.fnum = fnum;
setfile.setattre.in.create_time = t + 9*30*24*60*60;
setfile.setattre.in.access_time = t + 6*30*24*60*60;
@@ -212,7 +212,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.file.fnum = fnum;
+ fileinfo.generic.in.file.fnum = fnum;
status = smb_raw_fileinfo(cli->tree, mem_ctx, &fileinfo);
if (!NT_STATUS_IS_OK(status)) {
@@ -338,7 +338,7 @@ void torture_all_info(struct smbcli_tree *tree, const char *fname)
NTSTATUS status;
finfo.generic.level = RAW_FILEINFO_ALL_INFO;
- finfo.generic.file.path = fname;
+ finfo.generic.in.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));
@@ -380,7 +380,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.path = fname;
+ sfinfo.generic.in.file.path = fname;
ZERO_STRUCT(sfinfo.basic_info.in);
sfinfo.basic_info.in.attrib = attrib;
@@ -405,7 +405,7 @@ NTSTATUS torture_set_sparse(struct smbcli_tree *tree, int fnum)
nt.ntioctl.level = RAW_IOCTL_NTIOCTL;
nt.ntioctl.in.function = 0x900c4;
- nt.ntioctl.file.fnum = fnum;
+ nt.ntioctl.in.file.fnum = fnum;
nt.ntioctl.in.fsctl = True;
nt.ntioctl.in.filter = 0;
@@ -428,7 +428,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.path = fname;
+ info.ea_list.in.file.path = fname;
info.ea_list.in.num_names = 1;
info.ea_list.in.ea_names = &ea;