r14173: change smb interface structures to always use
authorStefan Metzmacher <metze@samba.org>
Fri, 10 Mar 2006 20:49:20 +0000 (20:49 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:56:57 +0000 (13:56 -0500)
a union smb_file, to abtract
- const char *path fot qpathinfo and setpathinfo
- uint16_t fnum for SMB
- smb2_handle handle for SMB2

the idea is to later add a struct ntvfs_handle *ntvfs
so that the ntvfs subsystem don't need to know the difference between SMB and SMB2

metze
(This used to be commit 2ef3f5970901b5accdb50f0d0115b5d46b0c788f)

72 files changed:
source4/client/cifsddio.c
source4/client/client.c
source4/libcli/clifile.c
source4/libcli/clireadwrite.c
source4/libcli/clitrans2.c
source4/libcli/raw/interfaces.h
source4/libcli/raw/rawacl.c
source4/libcli/raw/rawfile.c
source4/libcli/raw/rawfileinfo.c
source4/libcli/raw/rawioctl.c
source4/libcli/raw/rawnotify.c
source4/libcli/raw/rawreadwrite.c
source4/libcli/smb2/getinfo.c
source4/libcli/smb_composite/appendacl.c
source4/libcli/smb_composite/loadfile.c
source4/libcli/smb_composite/savefile.c
source4/librpc/rpc/dcerpc_smb.c
source4/ntvfs/cifs/vfs_cifs.c
source4/ntvfs/ipc/vfs_ipc.c
source4/ntvfs/nbench/vfs_nbench.c
source4/ntvfs/ntvfs.h
source4/ntvfs/ntvfs_generic.c
source4/ntvfs/ntvfs_interface.c
source4/ntvfs/posix/pvfs_acl.c
source4/ntvfs/posix/pvfs_flush.c
source4/ntvfs/posix/pvfs_ioctl.c
source4/ntvfs/posix/pvfs_lock.c
source4/ntvfs/posix/pvfs_open.c
source4/ntvfs/posix/pvfs_qfileinfo.c
source4/ntvfs/posix/pvfs_read.c
source4/ntvfs/posix/pvfs_seek.c
source4/ntvfs/posix/pvfs_unlink.c
source4/ntvfs/posix/pvfs_write.c
source4/ntvfs/posix/vfs_posix.c
source4/ntvfs/print/vfs_print.c
source4/ntvfs/simple/vfs_simple.c
source4/ntvfs/unixuid/vfs_unixuid.c
source4/smb_server/smb/nttrans.c
source4/smb_server/smb/reply.c
source4/smb_server/smb/trans2.c
source4/torture/basic/delaywrite.c
source4/torture/basic/delete.c
source4/torture/basic/denytest.c
source4/torture/basic/disconnect.c
source4/torture/gentest.c
source4/torture/nbench/nbio.c
source4/torture/raw/acls.c
source4/torture/raw/chkpath.c
source4/torture/raw/close.c
source4/torture/raw/context.c
source4/torture/raw/eas.c
source4/torture/raw/ioctl.c
source4/torture/raw/lock.c
source4/torture/raw/mux.c
source4/torture/raw/notify.c
source4/torture/raw/open.c
source4/torture/raw/oplock.c
source4/torture/raw/qfileinfo.c
source4/torture/raw/read.c
source4/torture/raw/rename.c
source4/torture/raw/search.c
source4/torture/raw/seek.c
source4/torture/raw/setfileinfo.c
source4/torture/raw/streams.c
source4/torture/raw/unlink.c
source4/torture/raw/write.c
source4/torture/smb2/find.c
source4/torture/smb2/getinfo.c
source4/torture/smb2/setinfo.c
source4/torture/smb2/util.c
source4/torture/torture.c
source4/torture/torture_util.c

index fee5540a5ae9c37d8215af416c7171671f8c123e..c66cb5eeeef142af8ce7ed0545fc9b72dc426120 100644 (file)
@@ -169,7 +169,7 @@ BOOL smb_read_func(void * handle,
        smbh = IO_HANDLE_TO_SMB(handle);
 
        r.generic.level = RAW_READ_READX;
-       r.readx.in.fnum = smbh->fnum;
+       r.readx.file.fnum = smbh->fnum;
        r.readx.in.offset = smbh->offset;
        r.readx.in.mincnt = wanted;
        r.readx.in.maxcnt = wanted;
@@ -207,7 +207,7 @@ BOOL smb_write_func(void * handle,
        smbh = IO_HANDLE_TO_SMB(handle);
 
        w.generic.level = RAW_WRITE_WRITEX;
-       w.writex.in.fnum = smbh->fnum;
+       w.writex.file.fnum = smbh->fnum;
        w.writex.in.offset = smbh->offset;
        w.writex.in.count = wanted;
        w.writex.in.data = buf;
@@ -290,7 +290,7 @@ static int open_smb_file(struct smbcli_state * cli,
                return(-1);
        }
 
-       return(o.ntcreatex.out.fnum);
+       return(o.ntcreatex.file.fnum);
 }
 
 static struct dd_iohandle * open_smb_handle(const char * host,
index b154b557d4a1ad0c70e64d075fcbf9efde382e39..fa3d3e71f6c9f47efe1f9e1fcd2f860982976c00 100644 (file)
@@ -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.in.fname = fname;
+       finfo.generic.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));
@@ -1821,8 +1821,8 @@ static int cmd_eainfo(struct smbclient_context *ctx, const char **args)
        }
        fname = talloc_strdup(ctx, args[1]);
 
-       finfo.generic.in.fname = fname;
        finfo.generic.level = RAW_FILEINFO_ALL_EAS;
+       finfo.generic.file.path = fname;
        status = smb_raw_pathinfo(ctx->cli->tree, ctx, &finfo);
        
        if (!NT_STATUS_IS_OK(status)) {
@@ -1877,8 +1877,8 @@ static int cmd_acl(struct smbclient_context *ctx, const char **args)
        }
 
        query.query_secdesc.level = RAW_FILEINFO_SEC_DESC;
-       query.query_secdesc.in.fnum = fnum;
-       query.query_secdesc.secinfo_flags = 0x7;
+       query.query_secdesc.file.fnum = fnum;
+       query.query_secdesc.in.secinfo_flags = 0x7;
 
        status = smb_raw_fileinfo(ctx->cli->tree, ctx, &query);
        if (!NT_STATUS_IS_OK(status)) {
index e8cb5480075765f3f43a1a94708c9bfddaac1340..d3de0dab7746fbe97bbaa48f870f4dd754519b79 100644 (file)
@@ -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.fname = fname_src;
+               parms.unix_hlink.file.path = fname_src;
                parms.unix_hlink.in.link_dest = fname_dst;
        } else {
                parms.generic.level = RAW_SFILEINFO_UNIX_LINK;
-               parms.unix_link.file.fname = fname_src;
+               parms.unix_link.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.fname = fname;
+       parms.unix_basic.file.path = fname;
        parms.unix_basic.in.uid = uid;
        parms.unix_basic.in.gid = gid;
        parms.unix_basic.in.mode = mode;
@@ -165,13 +165,13 @@ NTSTATUS smbcli_rename(struct smbcli_tree *tree, const char *fname_src,
 ****************************************************************************/
 NTSTATUS smbcli_unlink(struct smbcli_tree *tree, const char *fname)
 {
-       struct smb_unlink parms;
+       union smb_unlink parms;
 
-       parms.in.pattern = fname;
+       parms.unlink.in.pattern = fname;
        if (strchr(fname, '*')) {
-               parms.in.attrib = FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN;
+               parms.unlink.in.attrib = FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN;
        } else {
-               parms.in.attrib = FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_DIRECTORY;
+               parms.unlink.in.attrib = FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_DIRECTORY;
        }
 
        return smb_raw_unlink(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.out.fnum;
+               return open_parms.ntcreatex.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.out.fnum;
+               return open_parms.openx.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.in.fnum = fnum;
+       close_parms.close.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.in.fnum = fnum;
+       parms.lockx.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.in.fnum = fnum;
+       parms.lockx.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.in.fnum = fnum;
+       parms.lockx.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.in.fnum = fnum;
+       parms.lockx.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.in.fnum = fnum;
+       parms.lockx.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.in.fnum = fnum;
+       parms.getattre.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.in.fname = fname;
+       parms.getattr.file.path = fname;
 
        status = smb_raw_pathinfo(tree, NULL, &parms);
        
@@ -579,9 +579,9 @@ 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.attrib = mode;
        parms.setattr.in.write_time = t;
-       parms.setattr.file.fname = fname;
        
        status = smb_raw_setpathinfo(tree, &parms);
 
@@ -594,7 +594,7 @@ NTSTATUS smbcli_setatr(struct smbcli_tree *tree, const char *fname, uint16_t mod
 ****************************************************************************/
 NTSTATUS smbcli_chkpath(struct smbcli_tree *tree, const char *path)
 {
-       struct smb_chkpath parms;
+       union smb_chkpath parms;
        char *path2;
        NTSTATUS status;
 
@@ -605,8 +605,8 @@ NTSTATUS smbcli_chkpath(struct smbcli_tree *tree, const char *path)
                path2 = strdup("\\");
        }
 
-       parms.in.path = path2;
-       
+       parms.chkpath.in.path = path2;
+
        status = smb_raw_chkpath(tree, &parms);
 
        free(path2);
@@ -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.out.fnum;
+               return open_parms.ctemp.file.fnum;
        }
        return -1;
 }
index 4248ac42860cc8ed11653dacb5ce0ef67c25b468..afffba968a74e07243c69bfa686fb515a0c9d2e0 100644 (file)
@@ -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.in.fnum = fnum;
+       parms.readx.file.fnum = fnum;
 
        /*
         * Set readsize to the maximum size we can handle in one readX,
@@ -100,7 +100,7 @@ ssize_t smbcli_write(struct smbcli_tree *tree,
 
 
        parms.writex.level = RAW_WRITE_WRITEX;
-       parms.writex.in.fnum = fnum;
+       parms.writex.file.fnum = fnum;
        parms.writex.in.wmode = write_mode;
        parms.writex.in.remaining = 0;
        
@@ -144,7 +144,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.in.fnum = fnum;
+               parms.write.file.fnum = fnum;
                parms.write.in.offset = offset;
                parms.write.in.count = size;
                parms.write.in.data = buf + total;
index c440b25e36edab58cbde7e9a97d3ebdbda53adfd..f8699e0191a6c9ef6228a67009ff56850374e51e 100644 (file)
@@ -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.in.fname = fname;
+       parms.standard.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.in.fname = fname;
+       parms.all_info.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.in.fnum = fnum;
+       parms.name_info.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.in.fnum = fnum;
+       parms.all_info.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.in.fname = fname;
+       parms.alt_name_info.file.path = fname;
 
        mem_ctx = talloc_init("smbcli_qpathinfo_alt_name");
        if (!mem_ctx) return NT_STATUS_NO_MEMORY;
index 034878a464ab09b2a5ab378e8d432d45ea1ee643..0505078fd4859ee4cf0e45764589420a87a38c9f 100644 (file)
@@ -56,6 +56,29 @@ typedef struct {
 /* same struct as dom_sid but inside a 28 bytes fixed buffer in NDR */
 #define dom_sid28 dom_sid
 
+/*
+ a generic container for file handles
+*/
+union smb_file {
+       /*
+        * this is only 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 {
+               uint64_t data[2];
+       } handle;
+};
 
 /*
   this header defines the structures and unions used between the SMB
@@ -63,32 +86,37 @@ typedef struct {
 */
 
 /* struct used for SMBlseek call */
-struct smb_seek {
-       struct {
-               uint16_t fnum;
-               uint16_t mode;
-               int32_t  offset; /* signed */
-       } in;
+union smb_seek {
        struct {
-               int32_t offset;
-       } out;
+               union smb_file file;
+               struct {
+                       uint16_t mode;
+                       int32_t  offset; /* signed */
+               } in;
+               struct {
+                       int32_t offset;
+               } out;
+       } lseek;
 };
 
-
 /* struct used in unlink() call */
-struct smb_unlink {
+union smb_unlink {
        struct {
-               const char *pattern;
-               uint16_t attrib;
-       } in;
+               struct {
+                       const char *pattern;
+                       uint16_t attrib;
+               } in;
+       } unlink;
 };
 
 
 /* struct used in chkpath() call */
-struct smb_chkpath {
+union smb_chkpath {
        struct {
-               const char *path;
-       } in;
+               struct {
+                       const char *path;
+               } in;
+       } chkpath;
 };
 
 enum smb_mkdir_level {RAW_MKDIR_GENERIC, RAW_MKDIR_MKDIR, RAW_MKDIR_T2MKDIR};
@@ -326,32 +354,14 @@ enum smb_fileinfo_level {
                     RAW_FILEINFO_SMB2_ALL_INFORMATION       = 0x1201
 };
 
-/*
-  file handles in SMB2 are 16 bytes
-*/
-struct smb2_handle {
-       uint64_t data[2];
-};
-
-
 /* union used in qfileinfo() and qpathinfo() backend calls */
 union smb_fileinfo {
        /* generic interface:
         * matches RAW_FILEINFO_GENERIC */
        struct {
                enum smb_fileinfo_level level;
+               union smb_file file;
 
-               /* each level can be called on either a pathname or a
-                  filename, in either case the return format is
-                  identical 
-                  On SMB2 a 16 byte handle is used 
-               */
-               union smb_fileinfo_in {
-                       const char *fname;
-                       uint16_t fnum;
-                       struct smb2_handle handle;
-               } in;
-               
                struct {
                        uint32_t attrib;
                        uint32_t ea_size;
@@ -397,7 +407,7 @@ union smb_fileinfo {
         * matches RAW_FILEINFO_GETATTR */
        struct {
                enum smb_fileinfo_level level;
-               union smb_fileinfo_in in;
+               union smb_file file;
 
                struct {
                        uint16_t attrib;
@@ -409,7 +419,7 @@ union smb_fileinfo {
        /* SMBgetattrE and  RAW_FILEINFO_STANDARD interface */
        struct {
                enum smb_fileinfo_level level;
-               union smb_fileinfo_in in;
+               union smb_file file;
 
                struct {
                        time_t create_time;
@@ -424,7 +434,7 @@ union smb_fileinfo {
        /* trans2 RAW_FILEINFO_EA_SIZE interface */
        struct {
                enum smb_fileinfo_level level;
-               union smb_fileinfo_in in;
+               union smb_file file;
 
                struct {
                        time_t create_time;
@@ -440,7 +450,7 @@ union smb_fileinfo {
        /* trans2 RAW_FILEINFO_EA_LIST interface */
        struct {
                enum smb_fileinfo_level level;
-               union smb_fileinfo_in file;
+               union smb_file file;
 
                struct {
                        uint_t num_names;
@@ -458,9 +468,11 @@ union smb_fileinfo {
        /* trans2 RAW_FILEINFO_ALL_EAS and RAW_FILEINFO_FULL_EA_INFORMATION interfaces */
        struct {
                enum smb_fileinfo_level level;
-               union smb_fileinfo_in in;
-               uint8_t continue_flags; /* SMB2 only - SMB2_CONTINUE_FLAG_* */
-
+               union smb_file file;
+               struct {
+                       /* SMB2 only - SMB2_CONTINUE_FLAG_* */
+                       uint8_t continue_flags;
+               } in;
                struct smb_ea_list out;
        } all_eas;
 
@@ -468,13 +480,13 @@ union smb_fileinfo {
           only valid for a QPATHNAME call - no returned data */
        struct {
                enum smb_fileinfo_level level;
-               union smb_fileinfo_in in;
+               union smb_file file;
        } is_name_valid;
 
        /* RAW_FILEINFO_BASIC_INFO and RAW_FILEINFO_BASIC_INFORMATION interfaces */
        struct {
                enum smb_fileinfo_level level;
-               union smb_fileinfo_in in;
+               union smb_file file;
 
                struct {
                        NTTIME create_time;
@@ -489,7 +501,7 @@ union smb_fileinfo {
        /* RAW_FILEINFO_STANDARD_INFO and RAW_FILEINFO_STANDARD_INFORMATION interfaces */
        struct {
                enum smb_fileinfo_level level;
-               union smb_fileinfo_in in;
+               union smb_file file;
 
                struct {
                        uint64_t alloc_size;
@@ -503,7 +515,7 @@ union smb_fileinfo {
        /* RAW_FILEINFO_EA_INFO and RAW_FILEINFO_EA_INFORMATION interfaces */
        struct {
                enum smb_fileinfo_level level;
-               union smb_fileinfo_in in;
+               union smb_file file;
 
                struct {
                        uint32_t ea_size;
@@ -513,7 +525,7 @@ union smb_fileinfo {
        /* RAW_FILEINFO_NAME_INFO and RAW_FILEINFO_NAME_INFORMATION interfaces */
        struct {
                enum smb_fileinfo_level level;
-               union smb_fileinfo_in in;
+               union smb_file file;
 
                struct {
                        WIRE_STRING fname;
@@ -523,7 +535,7 @@ union smb_fileinfo {
        /* RAW_FILEINFO_ALL_INFO and RAW_FILEINFO_ALL_INFORMATION interfaces */
        struct {
                enum smb_fileinfo_level level;
-               union smb_fileinfo_in in;
+               union smb_file file;
 
                struct {
                        NTTIME create_time;
@@ -544,7 +556,7 @@ union smb_fileinfo {
        /* RAW_FILEINFO_SMB2_ALL_INFORMATION interface */
        struct {
                enum smb_fileinfo_level level;
-               union smb_fileinfo_in in;
+               union smb_file file;
 
                struct {
                        NTTIME   create_time;
@@ -571,7 +583,7 @@ union smb_fileinfo {
        /* RAW_FILEINFO_ALT_NAME_INFO and RAW_FILEINFO_ALT_NAME_INFORMATION interfaces */
        struct {
                enum smb_fileinfo_level level;
-               union smb_fileinfo_in in;
+               union smb_file file;
 
                struct {
                        WIRE_STRING fname;
@@ -581,7 +593,7 @@ union smb_fileinfo {
        /* RAW_FILEINFO_STREAM_INFO and RAW_FILEINFO_STREAM_INFORMATION interfaces */
        struct {
                enum smb_fileinfo_level level;
-               union smb_fileinfo_in in;
+               union smb_file file;
 
                struct stream_information {
                        uint_t num_streams;
@@ -592,7 +604,7 @@ union smb_fileinfo {
        /* RAW_FILEINFO_COMPRESSION_INFO and RAW_FILEINFO_COMPRESSION_INFORMATION interfaces */
        struct {
                enum smb_fileinfo_level level;
-               union smb_fileinfo_in in;
+               union smb_file file;
 
                struct {
                        uint64_t compressed_size;
@@ -606,7 +618,7 @@ union smb_fileinfo {
        /* RAW_FILEINFO_UNIX_BASIC interface */
        struct {
                enum smb_fileinfo_level level;
-               union smb_fileinfo_in in;
+               union smb_file file;
 
                struct {
                        uint64_t end_of_file;
@@ -628,7 +640,7 @@ union smb_fileinfo {
        /* RAW_FILEINFO_UNIX_LINK interface */
        struct {
                enum smb_fileinfo_level level;
-               union smb_fileinfo_in in;
+               union smb_file file;
 
                struct {
                        WIRE_STRING link_dest;
@@ -638,7 +650,7 @@ union smb_fileinfo {
        /* RAW_FILEINFO_INTERNAL_INFORMATION interface */
        struct {
                enum smb_fileinfo_level level;
-               union smb_fileinfo_in in;
+               union smb_file file;
 
                struct {
                        uint64_t file_id;
@@ -648,7 +660,7 @@ union smb_fileinfo {
        /* RAW_FILEINFO_ACCESS_INFORMATION interface */
        struct {
                enum smb_fileinfo_level level;
-               union smb_fileinfo_in in;
+               union smb_file file;
 
                struct {
                        uint32_t access_flags;
@@ -658,7 +670,7 @@ union smb_fileinfo {
        /* RAW_FILEINFO_POSITION_INFORMATION interface */
        struct {
                enum smb_fileinfo_level level;
-               union smb_fileinfo_in in;
+               union smb_file file;
 
                struct {
                        uint64_t position;
@@ -668,7 +680,7 @@ union smb_fileinfo {
        /* RAW_FILEINFO_MODE_INFORMATION interface */
        struct {
                enum smb_fileinfo_level level;
-               union smb_fileinfo_in in;
+               union smb_file file;
 
                struct {
                        uint32_t mode;
@@ -678,7 +690,7 @@ union smb_fileinfo {
        /* RAW_FILEINFO_ALIGNMENT_INFORMATION interface */
        struct {
                enum smb_fileinfo_level level;
-               union smb_fileinfo_in in;
+               union smb_file file;
 
                struct {
                        uint32_t alignment_requirement;
@@ -688,7 +700,7 @@ union smb_fileinfo {
        /* RAW_FILEINFO_NETWORK_OPEN_INFORMATION interface */
        struct {
                enum smb_fileinfo_level level;
-               union smb_fileinfo_in in;
+               union smb_file file;
 
                struct {
                        NTTIME create_time;
@@ -705,7 +717,7 @@ union smb_fileinfo {
        /* RAW_FILEINFO_ATTRIBUTE_TAG_INFORMATION interface */
        struct {
                enum smb_fileinfo_level level;
-               union smb_fileinfo_in in;
+               union smb_file file;
 
                struct {
                        uint32_t attrib;
@@ -716,8 +728,10 @@ union smb_fileinfo {
        /* RAW_FILEINFO_SEC_DESC */
        struct {
                enum smb_fileinfo_level level;
-               union smb_fileinfo_in in;
-               uint32_t secinfo_flags;
+               union smb_file file;
+               struct {
+                       uint32_t secinfo_flags;
+               } in;
                struct {
                        struct security_descriptor *sd;
                } out;
@@ -760,19 +774,13 @@ union smb_setfileinfo {
        struct {
                enum smb_setfileinfo_level level;
 
-               /* we are combining setfileinfo and setpathinfo into one 
-                  interface */
-               union setfileinfo_file {
-                       const char *fname;
-                       uint16_t fnum;
-                       struct smb2_handle handle; /* only for SMB2 */
-               } file;
+               union smb_file file;
        } generic;
 
        /* RAW_SFILEINFO_SETATTR (SMBsetatr) interface - only via setpathinfo() */
        struct {
                enum smb_setfileinfo_level level;
-               union setfileinfo_file file;
+               union smb_file file;
                struct {
                        uint16_t attrib;
                        time_t write_time;
@@ -783,8 +791,7 @@ union smb_setfileinfo {
           also RAW_SFILEINFO_STANDARD */
        struct {
                enum smb_setfileinfo_level level;
-               union setfileinfo_file file;
-
+               union smb_file file;
                struct {
                        time_t create_time;
                        time_t access_time;
@@ -797,7 +804,7 @@ union smb_setfileinfo {
        /* RAW_SFILEINFO_EA_SET interface */
        struct {
                enum smb_setfileinfo_level level;
-               union setfileinfo_file file;
+               union smb_file file;
                struct {
                        uint_t num_eas;
                        struct ea_struct *eas;                  
@@ -808,8 +815,7 @@ union smb_setfileinfo {
           RAW_SFILEINFO_BASIC_INFORMATION interfaces */
        struct {
                enum smb_setfileinfo_level level;
-               union setfileinfo_file file;
-
+               union smb_file file;
                struct {
                        NTTIME create_time;
                        NTTIME access_time;
@@ -823,8 +829,7 @@ union smb_setfileinfo {
           RAW_SFILEINFO_DISPOSITION_INFORMATION interfaces */
        struct {
                enum smb_setfileinfo_level level;
-               union setfileinfo_file file;
-
+               union smb_file file;
                struct {
                        BOOL delete_on_close;
                } in;
@@ -834,8 +839,7 @@ union smb_setfileinfo {
           RAW_SFILEINFO_ALLOCATION_INFORMATION interfaces */
        struct {
                enum smb_setfileinfo_level level;
-               union setfileinfo_file file;
-
+               union smb_file file;
                struct {
                        /* w2k3 rounds this up to nearest 4096 */
                        uint64_t alloc_size;
@@ -846,8 +850,7 @@ union smb_setfileinfo {
           RAW_SFILEINFO_END_OF_FILE_INFORMATION interfaces */
        struct {
                enum smb_setfileinfo_level level;
-               union setfileinfo_file file;
-
+               union smb_file file;
                struct {
                        uint64_t size;
                } in;
@@ -856,8 +859,7 @@ union smb_setfileinfo {
        /* RAW_SFILEINFO_RENAME_INFORMATION interface */
        struct {
                enum smb_setfileinfo_level level;
-               union setfileinfo_file file;
-
+               union smb_file file;
                struct smb_rename_information {
                        uint8_t overwrite;
                        uint32_t root_fid;
@@ -868,8 +870,7 @@ union smb_setfileinfo {
        /* RAW_SFILEINFO_POSITION_INFORMATION interface */
        struct {
                enum smb_setfileinfo_level level;
-               union setfileinfo_file file;
-
+               union smb_file file;
                struct {
                        uint64_t position;
                } in;
@@ -878,8 +879,7 @@ union smb_setfileinfo {
        /* RAW_SFILEINFO_MODE_INFORMATION interface */
        struct {
                enum smb_setfileinfo_level level;
-               union setfileinfo_file file;
-
+               union smb_file file;
                struct {
                        /* valid values seem to be 0, 2, 4 and 6 */
                        uint32_t mode;
@@ -891,7 +891,7 @@ union smb_setfileinfo {
        /* RAW_SFILEINFO_UNIX_BASIC interface */
        struct {
                enum smb_setfileinfo_level level;
-               union setfileinfo_file file;
+               union smb_file file;
                struct {
                        uint32_t mode; /* yuck - this field remains to fix compile of libcli/clifile.c */
                        uint64_t end_of_file;
@@ -913,7 +913,7 @@ union smb_setfileinfo {
        /* RAW_SFILEINFO_UNIX_LINK, RAW_SFILEINFO_UNIX_HLINK interface */
        struct {
                enum smb_setfileinfo_level level;
-               union setfileinfo_file file;
+               union smb_file file;
                struct {
                        const char *link_dest;
                } in;
@@ -922,7 +922,7 @@ union smb_setfileinfo {
        /* RAW_FILEINFO_SET_SEC_DESC */
        struct {
                enum smb_setfileinfo_level level;
-               union setfileinfo_file file;
+               union smb_file file;
                struct {
                        uint32_t secinfo_flags;
                        struct security_descriptor *sd;
@@ -1131,6 +1131,8 @@ 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;
@@ -1156,7 +1158,6 @@ union smb_open {
 
                struct {
                        uint8_t oplock_level;
-                       uint16_t fnum;
                        uint32_t create_action;
                        NTTIME create_time;
                        NTTIME access_time;
@@ -1174,6 +1175,8 @@ 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;
@@ -1190,7 +1193,6 @@ union smb_open {
                } in;
 
                struct {
-                       uint16_t fnum;
                        uint16_t attrib;
                        time_t write_time;
                        uint32_t size;
@@ -1205,14 +1207,16 @@ 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 {
-                       uint16_t fnum;
                        uint16_t attrib;
                        time_t write_time;
                        uint32_t size;
@@ -1223,6 +1227,8 @@ 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;
@@ -1238,7 +1244,6 @@ union smb_open {
                        const char *fname;
                } in;
                struct {
-                       uint16_t fnum;
                        uint16_t attrib;
                        time_t write_time;
                        uint32_t size;
@@ -1255,20 +1260,21 @@ 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 {
-                       uint16_t fnum;
-               } 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;
@@ -1276,7 +1282,6 @@ union smb_open {
                        const char *directory;
                } in;
                struct {
-                       uint16_t fnum;
                        /* temp name, relative to directory */
                        char *name; 
                } out;
@@ -1285,21 +1290,22 @@ 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 {
-                       uint16_t fnum;
-               } 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;
@@ -1321,7 +1327,6 @@ union smb_open {
                        uint16_t remaining;
                } in;
                struct {
-                       uint16_t fnum;
                        uint16_t attrib;
                        time_t write_time;
                        uint32_t size;
@@ -1357,9 +1362,9 @@ union smb_read {
        /* SMBreadX (and generic) interface */
        struct {
                enum smb_read_level level;
+               union smb_file file;
 
                struct {
-                       uint16_t fnum;
                        uint64_t offset;
                        uint16_t mincnt;
                        uint32_t maxcnt;
@@ -1376,9 +1381,9 @@ union smb_read {
        /* SMBreadbraw interface */
        struct {
                enum smb_read_level level;
+               union smb_file file;
 
                struct {
-                       uint16_t fnum;
                        uint64_t offset;
                        uint16_t  maxcnt;
                        uint16_t  mincnt;
@@ -1394,9 +1399,9 @@ union smb_read {
        /* SMBlockandread interface */
        struct {
                enum smb_read_level level;
+               union smb_file file;
 
                struct {
-                       uint16_t fnum;
                        uint16_t count;
                        uint32_t offset;
                        uint16_t remaining;
@@ -1410,9 +1415,9 @@ union smb_read {
        /* SMBread interface */
        struct {
                enum smb_read_level level;
+               union smb_file file;
 
                struct {
-                       uint16_t fnum;
                        uint16_t count;
                        uint32_t offset;
                        uint16_t remaining;
@@ -1437,9 +1442,9 @@ union smb_write {
        /* SMBwriteX interface */
        struct {
                enum smb_write_level level;
+               union smb_file file;
 
                struct {
-                       uint16_t fnum;
                        uint64_t offset;
                        uint16_t wmode;
                        uint16_t remaining;
@@ -1455,9 +1460,9 @@ union smb_write {
        /* SMBwriteunlock interface */
        struct {
                enum smb_write_level level;
+               union smb_file file;
 
                struct {
-                       uint16_t fnum;
                        uint16_t count;
                        uint32_t offset;
                        uint16_t remaining;
@@ -1471,9 +1476,9 @@ union smb_write {
        /* SMBwrite interface */
        struct {
                enum smb_write_level level;
+               union smb_file file;
 
                struct {
-                       uint16_t fnum;
                        uint16_t count;
                        uint32_t offset;
                        uint16_t remaining;
@@ -1487,9 +1492,9 @@ union smb_write {
        /* SMBwriteclose interface */
        struct {
                enum smb_write_level level;
+               union smb_file file;
 
                struct {
-                       uint16_t fnum;
                        uint16_t count;
                        uint32_t offset;
                        time_t mtime;
@@ -1503,9 +1508,9 @@ union smb_write {
        /* SMBsplwrite interface */
        struct {
                enum smb_write_level level;
+               union smb_file file;
 
                struct {
-                       uint16_t fnum;
                        uint16_t count;
                        const uint8_t *data;
                } in;
@@ -1524,9 +1529,9 @@ union smb_lock {
        /* SMBlockingX (and generic) interface */
        struct {
                enum smb_lock_level level;
+               union smb_file file;
 
                struct {
-                       uint16_t fnum;
                        uint16_t mode;
                        uint32_t timeout;
                        uint16_t ulock_cnt;
@@ -1542,9 +1547,9 @@ union smb_lock {
        /* SMBlock and SMBunlock interface */
        struct {
                enum smb_lock_level level;
+               union smb_file file;
 
                struct {
-                       uint16_t fnum;
                        uint32_t count;
                        uint32_t offset;
                } in;
@@ -1563,9 +1568,9 @@ union smb_close {
        /* SMBclose (and generic) interface */
        struct {
                enum smb_close_level level;
+               union smb_file file;
 
                struct {
-                       uint16_t fnum;
                        time_t write_time;
                } in;
        } close, generic;
@@ -1573,10 +1578,7 @@ union smb_close {
        /* SMBsplclose interface - empty! */
        struct {
                enum smb_close_level level;
-
-               struct {
-                       uint16_t fnum;
-               } in;
+               union smb_file file;
        } splclose;
 };
 
@@ -1625,14 +1627,15 @@ union smb_ioctl {
        /* generic interface */
        struct {
                enum smb_ioctl_level level;
+               union smb_file file;
 
        } generic;
 
        /* struct for SMBioctl */
        struct {
                enum smb_ioctl_level level;
+               union smb_file file;
                struct {
-                       uint16_t fnum;
                        uint32_t request;
                } in;
                struct {
@@ -1644,9 +1647,9 @@ union smb_ioctl {
        /* struct for NT ioctl call */
        struct {
                enum smb_ioctl_level level;
+               union smb_file file;
                struct {
                        uint32_t function;
-                       uint16_t fnum;
                        BOOL fsctl;
                        uint8_t filter;
                } in;
@@ -1657,10 +1660,10 @@ union smb_ioctl {
 };
 
 /* struct for SMBflush */
-struct smb_flush {
+union smb_flush {
        struct {
-               uint16_t fnum;
-       } in;
+               union smb_file file;
+       } flush;
 };
 
 
@@ -1725,24 +1728,25 @@ struct smb_nttrans {
 
 
 /* struct for nttrans change notify call */
-struct smb_notify {
+union smb_notify {
        struct {
-               uint32_t buffer_size;
-               uint32_t completion_filter;
-               uint16_t fnum;
-               BOOL recursive;
-       } in;
+               union smb_file file;
+               struct {
+                       uint32_t buffer_size;
+                       uint32_t completion_filter;
+                       BOOL recursive;
+               } in;
 
-       struct {
-               uint32_t num_changes;
-               struct notify_changes {
-                       uint32_t action;
-                       WIRE_STRING name;
-               } *changes;
-       } out;
+               struct {
+                       uint32_t num_changes;
+                       struct notify_changes {
+                               uint32_t action;
+                               WIRE_STRING name;
+                       } *changes;
+               } out;
+       } notify;
 };
 
-
 enum smb_search_level {RAW_SEARCH_GENERIC                 = 0xF000, 
                       RAW_SEARCH_SEARCH,                 /* SMBsearch */ 
                       RAW_SEARCH_FFIRST,                 /* SMBffirst */ 
index 08515eadde112a9e0c96e5b3b0b752de202c3bfe..7c0c17b4d75e5a1ae385a11f98b13546703462ac 100644 (file)
@@ -38,9 +38,9 @@ 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.in.fnum);
+       SSVAL(params, 0, io->query_secdesc.file.fnum);
        SSVAL(params, 2, 0); /* padding */
-       SIVAL(params, 4, io->query_secdesc.secinfo_flags);
+       SIVAL(params, 4, io->query_secdesc.in.secinfo_flags);
 
        nt.in.params.data = params;
        nt.in.params.length = 8;
index 9d2611f7b248bbc3b1862e35733c519b9df48770..0e63fa656ffa03674baa0ece03de662df160b0c4 100644 (file)
@@ -78,14 +78,14 @@ NTSTATUS smb_raw_rename(struct smbcli_tree *tree,
  Delete a file - async interface
 ****************************************************************************/
 struct smbcli_request *smb_raw_unlink_send(struct smbcli_tree *tree,
-                                       struct smb_unlink *parms)
+                                          union smb_unlink *parms)
 {
        struct smbcli_request *req; 
 
        SETUP_REQUEST(SMBunlink, 1, 0);
 
-       SSVAL(req->out.vwv, VWV(0), parms->in.attrib);
-       smbcli_req_append_ascii4(req, parms->in.pattern, STR_TERMINATE);
+       SSVAL(req->out.vwv, VWV(0), parms->unlink.in.attrib);
+       smbcli_req_append_ascii4(req, parms->unlink.in.pattern, STR_TERMINATE);
 
        if (!smbcli_request_send(req)) {
                smbcli_request_destroy(req);
@@ -98,7 +98,7 @@ struct smbcli_request *smb_raw_unlink_send(struct smbcli_tree *tree,
   delete a file - sync interface
 */
 NTSTATUS smb_raw_unlink(struct smbcli_tree *tree,
-                       struct smb_unlink *parms)
+                       union smb_unlink *parms)
 {
        struct smbcli_request *req = smb_raw_unlink_send(tree, parms);
        return smbcli_request_simple_recv(req);
@@ -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.out.fnum =                         SVAL(params, 2);
+       parms->ntcreatex.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.out.fnum =        SVAL(t2.out.params.data, VWV(0));
+       parms->t2open.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.out.fnum = SVAL(req->in.vwv, VWV(0));
+               parms->openold.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.out.fnum = SVAL(req->in.vwv, VWV(2));
+               parms->openx.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.out.fnum = SVAL(req->in.vwv, VWV(0));
+               parms->mknew.file.fnum = SVAL(req->in.vwv, VWV(0));
                break;
 
        case RAW_OPEN_CREATE:
                SMBCLI_CHECK_WCT(req, 1);
-               parms->create.out.fnum = SVAL(req->in.vwv, VWV(0));
+               parms->create.file.fnum = SVAL(req->in.vwv, VWV(0));
                break;
 
        case RAW_OPEN_CTEMP:
                SMBCLI_CHECK_WCT(req, 1);
-               parms->ctemp.out.fnum = SVAL(req->in.vwv, VWV(0));
+               parms->ctemp.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.out.fnum = SVAL(req->in.vwv, VWV(0));
+               parms->splopen.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.out.fnum =                      SVAL(req->in.vwv, 5);
+               parms->ntcreatex.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.out.fnum = SVAL(req->in.vwv, VWV(2));
+               parms->openxreadx.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.in.fnum);
+               SSVAL(req->out.vwv, VWV(0), parms->close.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.in.fnum);
+               SSVAL(req->out.vwv, VWV(0), parms->splclose.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.in.fnum);
+               SSVAL(req->out.vwv, VWV(0), parms->lock.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.in.fnum);
+               SSVAL(req->out.vwv, VWV(0), parms->unlock.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.in.fnum);
+               SSVAL(req->out.vwv, VWV(2), parms->lockx.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);
@@ -816,13 +816,13 @@ NTSTATUS smb_raw_lock(struct smbcli_tree *tree, union smb_lock *parms)
 /****************************************************************************
  Check for existence of a dir - async send
 ****************************************************************************/
-struct smbcli_request *smb_raw_chkpath_send(struct smbcli_tree *tree, struct smb_chkpath *parms)
+struct smbcli_request *smb_raw_chkpath_send(struct smbcli_tree *tree, union smb_chkpath *parms)
 {
        struct smbcli_request *req; 
 
        SETUP_REQUEST(SMBchkpth, 0, 0);
 
-       smbcli_req_append_ascii4(req, parms->in.path, STR_TERMINATE);
+       smbcli_req_append_ascii4(req, parms->chkpath.in.path, STR_TERMINATE);
 
        if (!smbcli_request_send(req)) {
                smbcli_request_destroy(req);
@@ -835,25 +835,22 @@ struct smbcli_request *smb_raw_chkpath_send(struct smbcli_tree *tree, struct smb
 /****************************************************************************
  Check for existence of a dir - sync interface
 ****************************************************************************/
-NTSTATUS smb_raw_chkpath(struct smbcli_tree *tree, struct smb_chkpath *parms)
+NTSTATUS smb_raw_chkpath(struct smbcli_tree *tree, union smb_chkpath *parms)
 {
        struct smbcli_request *req = smb_raw_chkpath_send(tree, parms);
        return smbcli_request_simple_recv(req);
 }
 
-
-
-
 /****************************************************************************
  flush a file - async send
  a flush to fnum 0xFFFF will flush all files
 ****************************************************************************/
-struct smbcli_request *smb_raw_flush_send(struct smbcli_tree *tree, struct smb_flush *parms)
+struct smbcli_request *smb_raw_flush_send(struct smbcli_tree *tree, union smb_flush *parms)
 {
        struct smbcli_request *req; 
 
        SETUP_REQUEST(SMBflush, 1, 0);
-       SSVAL(req->out.vwv, VWV(0), parms->in.fnum);
+       SSVAL(req->out.vwv, VWV(0), parms->flush.file.fnum);
 
        if (!smbcli_request_send(req)) {
                smbcli_request_destroy(req);
@@ -867,7 +864,7 @@ struct smbcli_request *smb_raw_flush_send(struct smbcli_tree *tree, struct smb_f
 /****************************************************************************
  flush a file - sync interface
 ****************************************************************************/
-NTSTATUS smb_raw_flush(struct smbcli_tree *tree, struct smb_flush *parms)
+NTSTATUS smb_raw_flush(struct smbcli_tree *tree, union smb_flush *parms)
 {
        struct smbcli_request *req = smb_raw_flush_send(tree, parms);
        return smbcli_request_simple_recv(req);
@@ -878,15 +875,15 @@ NTSTATUS smb_raw_flush(struct smbcli_tree *tree, struct smb_flush *parms)
  seek a file - async send
 ****************************************************************************/
 struct smbcli_request *smb_raw_seek_send(struct smbcli_tree *tree,
-                                     struct smb_seek *parms)
+                                        union smb_seek *parms)
 {
        struct smbcli_request *req; 
 
        SETUP_REQUEST(SMBlseek, 4, 0);
 
-       SSVAL(req->out.vwv, VWV(0), parms->in.fnum);
-       SSVAL(req->out.vwv, VWV(1), parms->in.mode);
-       SIVALS(req->out.vwv, VWV(2), parms->in.offset);
+       SSVAL(req->out.vwv, VWV(0), parms->lseek.file.fnum);
+       SSVAL(req->out.vwv, VWV(1), parms->lseek.in.mode);
+       SIVALS(req->out.vwv, VWV(2), parms->lseek.in.offset);
 
        if (!smbcli_request_send(req)) {
                smbcli_request_destroy(req);
@@ -899,7 +896,7 @@ struct smbcli_request *smb_raw_seek_send(struct smbcli_tree *tree,
  seek a file - async receive
 ****************************************************************************/
 NTSTATUS smb_raw_seek_recv(struct smbcli_request *req,
-                                     struct smb_seek *parms)
+                          union smb_seek *parms)
 {
        if (!smbcli_request_receive(req) ||
            smbcli_request_is_error(req)) {
@@ -907,7 +904,7 @@ NTSTATUS smb_raw_seek_recv(struct smbcli_request *req,
        }
 
        SMBCLI_CHECK_WCT(req, 2);       
-       parms->out.offset = IVAL(req->in.vwv, VWV(0));
+       parms->lseek.out.offset = IVAL(req->in.vwv, VWV(0));
 
 failed:        
        return smbcli_request_destroy(req);
@@ -917,7 +914,7 @@ failed:
   seek a file - sync interface
 */
 NTSTATUS smb_raw_seek(struct smbcli_tree *tree,
-                     struct smb_seek *parms)
+                     union smb_seek *parms)
 {
        struct smbcli_request *req = smb_raw_seek_send(tree, parms);
        return smb_raw_seek_recv(req, parms);
index 92d31b30ef108aa2b77a36b9b4efa57887d2d7ae..b50a330093cd296153056bdcfe485b1165a649bc 100644 (file)
@@ -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.in.fname, STR_TERMINATE);
+       smbcli_req_append_ascii4(req, parms->getattr.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.in.fnum);
+       SSVAL(req->out.vwv, VWV(0), parms->getattre.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.in.fnum,
+                                        parms->generic.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.in.fname,
+       req = smb_raw_pathinfo_blob_send(tree, parms->generic.file.path,
                                         parms->generic.level, data);
        data_blob_free(&data);
 
index 874d05501310cba9864143f3f32e603cc89b5a51..28b58ff2a39dfc94f1e22ef46c08721844aed706 100644 (file)
@@ -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.in.fnum);
+       SSVAL(req->out.vwv, VWV(0), parms->ioctl.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.in.fnum);
+       SSVAL(setup, 4, parms->ntioctl.file.fnum);
        SCVAL(setup, 6, parms->ntioctl.in.fsctl);
        SCVAL(setup, 7, parms->ntioctl.in.filter);
        nt.in.function = NT_TRANSACT_IOCTL;
index 1215a93f59b12b7ca60fe2abbdbac5980d06a743..3adb1b000b272c45a1768b00046194eca758d1f2 100644 (file)
 /****************************************************************************
 change notify (async send)
 ****************************************************************************/
-struct smbcli_request *smb_raw_changenotify_send(struct smbcli_tree *tree, struct smb_notify *parms)
+struct smbcli_request *smb_raw_changenotify_send(struct smbcli_tree *tree, union smb_notify *parms)
 {
        struct smb_nttrans nt;
        uint16_t setup[4];
 
        nt.in.max_setup = 0;
-       nt.in.max_param = parms->in.buffer_size;
+       nt.in.max_param = parms->notify.in.buffer_size;
        nt.in.max_data = 0;
        nt.in.setup_count = 4;
        nt.in.setup = setup;
-       SIVAL(setup, 0, parms->in.completion_filter);
-       SSVAL(setup, 4, parms->in.fnum);
-       SSVAL(setup, 6, parms->in.recursive);   
+       SIVAL(setup, 0, parms->notify.in.completion_filter);
+       SSVAL(setup, 4, parms->notify.file.fnum);
+       SSVAL(setup, 6, parms->notify.in.recursive);    
        nt.in.function = NT_TRANSACT_NOTIFY_CHANGE;
        nt.in.params = data_blob(NULL, 0);
        nt.in.data = data_blob(NULL, 0);
@@ -49,7 +49,7 @@ struct smbcli_request *smb_raw_changenotify_send(struct smbcli_tree *tree, struc
 change notify (async recv)
 ****************************************************************************/
 NTSTATUS smb_raw_changenotify_recv(struct smbcli_request *req, 
-                                  TALLOC_CTX *mem_ctx, struct smb_notify *parms)
+                                  TALLOC_CTX *mem_ctx, union smb_notify *parms)
 {
        struct smb_nttrans nt;
        NTSTATUS status;
@@ -61,28 +61,28 @@ NTSTATUS smb_raw_changenotify_recv(struct smbcli_request *req,
                return status;
        }
 
-       parms->out.changes = NULL;
-       parms->out.num_changes = 0;
+       parms->notify.out.changes = NULL;
+       parms->notify.out.num_changes = 0;
        
        /* count them */
        for (ofs=0; nt.out.params.length - ofs > 12; ) {
                uint32_t next = IVAL(nt.out.params.data, ofs);
-               parms->out.num_changes++;
+               parms->notify.out.num_changes++;
                if (next == 0 ||
                    ofs + next >= nt.out.params.length) break;
                ofs += next;
        }
 
        /* allocate array */
-       parms->out.changes = talloc_array(mem_ctx, struct notify_changes, parms->out.num_changes);
-       if (!parms->out.changes) {
+       parms->notify.out.changes = talloc_array(mem_ctx, struct notify_changes, parms->notify.out.num_changes);
+       if (!parms->notify.out.changes) {
                return NT_STATUS_NO_MEMORY;
        }
 
-       for (i=ofs=0; i<parms->out.num_changes; i++) {
-               parms->out.changes[i].action = IVAL(nt.out.params.data, ofs+4);
+       for (i=ofs=0; i<parms->notify.out.num_changes; i++) {
+               parms->notify.out.changes[i].action = IVAL(nt.out.params.data, ofs+4);
                smbcli_blob_pull_string(session, mem_ctx, &nt.out.params, 
-                                    &parms->out.changes[i].name, 
+                                    &parms->notify.out.changes[i].name, 
                                     ofs+8, ofs+12, STR_UNICODE);
                ofs += IVAL(nt.out.params.data, ofs);
        }
index d9fe3fdce0d598e0d19b80a3a396930222e7e79c..00dc71971ef759595b2fbd7a12a8395e6a58753d 100644 (file)
@@ -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.in.fnum);
+               SSVAL(req->out.vwv, VWV(0), parms->readbraw.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.in.fnum);
+               SSVAL(req->out.vwv, VWV(0), parms->lockread.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.in.fnum);
+               SSVAL(req->out.vwv, VWV(0), parms->read.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.in.fnum);
+               SSVAL(req->out.vwv, VWV(2), parms->readx.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);
@@ -183,7 +183,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.in.fnum);
+               SSVAL(req->out.vwv, VWV(0), parms->writeunlock.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);
@@ -197,7 +197,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.in.fnum);
+               SSVAL(req->out.vwv, VWV(0), parms->write.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);
@@ -210,7 +210,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.in.fnum);
+               SSVAL(req->out.vwv, VWV(0), parms->writeclose.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,
@@ -229,7 +229,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.in.fnum);
+               SSVAL(req->out.vwv, VWV(2), parms->writex.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);
@@ -247,7 +247,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.in.fnum);
+               SSVAL(req->out.vwv, VWV(0), parms->splwrite.file.fnum);
                if (parms->splwrite.in.count > 0) {
                        memcpy(req->out.data, parms->splwrite.in.data, parms->splwrite.in.count);
                }
index e406fdf45c11188f22fd5f28dc98b9fafbd66b2f..3710fdfa081e0224a27b6ee46732ab070220a61e 100644 (file)
@@ -118,14 +118,14 @@ 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.in.handle;
+       b.in.handle            = io->generic.file.handle;
        b.in.level             = smb2_level;
 
        if (io->generic.level == RAW_FILEINFO_SEC_DESC) {
-               b.in.flags = io->query_secdesc.secinfo_flags;
+               b.in.flags = io->query_secdesc.in.secinfo_flags;
        }
        if (io->generic.level == RAW_FILEINFO_SMB2_ALL_EAS) {
-               b.in.flags2 = io->all_eas.continue_flags;
+               b.in.flags2 = io->all_eas.in.continue_flags;
        }
 
        return smb2_getinfo_send(tree, &b);
index 0a5b56b90d747da7a87cfe3c4ef6b4da562e5852..b09acfaf6371fae669ed2cf0e2d67c185bdf3c19 100644 (file)
@@ -37,8 +37,8 @@ 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.in.fnum = state->io_open->ntcreatex.out.fnum;
-       state->io_fileinfo->query_secdesc.secinfo_flags = SECINFO_DACL;
+       state->io_fileinfo->query_secdesc.file.fnum = state->io_open->ntcreatex.file.fnum;
+       state->io_fileinfo->query_secdesc.in.secinfo_flags = SECINFO_DACL;
 
        state->req = smb_raw_fileinfo_send(tree, state->io_fileinfo);
        NT_STATUS_HAVE_NO_MEMORY(state->req);
@@ -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.in.fnum;
+       state->io_setfileinfo->set_secdesc.file.fnum        = state->io_fileinfo->query_secdesc.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,8 +115,8 @@ static NTSTATUS appendacl_set(struct composite_context *c,
        
 
        state->io_fileinfo->query_secdesc.level = RAW_FILEINFO_SEC_DESC;
-       state->io_fileinfo->query_secdesc.in.fnum = state->io_setfileinfo->set_secdesc.file.fnum;
-       state->io_fileinfo->query_secdesc.secinfo_flags = SECINFO_DACL;
+       state->io_fileinfo->query_secdesc.file.fnum = state->io_setfileinfo->set_secdesc.file.fnum;
+       state->io_fileinfo->query_secdesc.in.secinfo_flags = SECINFO_DACL;
 
        state->req = smb_raw_fileinfo_send(tree, state->io_fileinfo);
        NT_STATUS_HAVE_NO_MEMORY(state->req);
@@ -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.in.fnum = state->io_fileinfo->query_secdesc.in.fnum;
+       io_close->close.file.fnum = state->io_fileinfo->query_secdesc.file.fnum;
        io_close->close.in.write_time = 0;
 
        state->req = smb_raw_close_send(tree, io_close);
index 2551b6da9e6f3bcf71f74b80060579531df6e602..9a593c07266a4331e9b25f651040c8a6607889c8 100644 (file)
@@ -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.in.fnum = fnum;
+       io_close->close.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.out.fnum);
+               return setup_close(c, tree, state->io_open->ntcreatex.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.in.fnum      = state->io_open->ntcreatex.out.fnum;
+       state->io_read->readx.file.fnum    = state->io_open->ntcreatex.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;
@@ -139,7 +139,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.in.fnum);
+               return setup_close(c, tree, state->io_read->readx.file.fnum);
        }
 
        /* setup for the next read */
index 9600af97d2e0efbf47f13e7d4b8de10ca617a7c7..89a2d26c0c18ee5a73d619f0fd9ce6b59b572651 100644 (file)
@@ -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.in.fnum = fnum;
+       io_close->close.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.out.fnum);
+               return setup_close(c, tree, state->io_open->ntcreatex.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.in.fnum      = state->io_open->ntcreatex.out.fnum;
+       io_write->writex.file.fnum    = state->io_open->ntcreatex.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.in.fnum);
+               return setup_close(c, tree, state->io_write->writex.file.fnum);
        }
 
        /* setup for the next write */
index c0716a1af894755c566e8de27c1d1777a75ad9e0..cf82f1daed21b74f43d67f59b92f4c67808e0fbd 100644 (file)
@@ -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.in.fnum = smb->fnum;
+       io->readx.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;
@@ -295,7 +295,7 @@ static NTSTATUS smb_send_request(struct dcerpc_connection *c, DATA_BLOB *blob, B
        }
 
        io.generic.level = RAW_WRITE_WRITEX;
-       io.writex.in.fnum = smb->fnum;
+       io.writex.file.fnum = smb->fnum;
        io.writex.in.offset = 0;
        io.writex.in.wmode = PIPE_START_MESSAGE;
        io.writex.in.remaining = blob->length;
@@ -334,7 +334,7 @@ static NTSTATUS smb_shutdown_pipe(struct dcerpc_connection *c)
        if (!smb) return NT_STATUS_OK;
 
        io.close.level = RAW_CLOSE_CLOSE;
-       io.close.in.fnum = smb->fnum;
+       io.close.file.fnum = smb->fnum;
        io.close.in.write_time = 0;
        req = smb_raw_close_send(smb->tree, &io);
        if (req != NULL) {
@@ -478,7 +478,7 @@ static void pipe_open_recv(struct smbcli_request *req)
                goto done;
        }
 
-       smb->fnum       = state->open->ntcreatex.out.fnum;
+       smb->fnum       = state->open->ntcreatex.file.fnum;
        smb->tree       = talloc_reference(smb, state->tree);
        smb->server_name= strupper_talloc(
                smb, state->tree->session->transport->called.name);
index f6a8da14e71e439d7c2714f2ab3369ab92de9aab..2741e97d2da44a3bcd2c85b614648f1f79ff7415 100644 (file)
@@ -237,7 +237,7 @@ static void async_simple(struct smbcli_request *c_req)
   The name can contain CIFS wildcards, but rarely does (except with OS/2 clients)
 */
 static NTSTATUS cvfs_unlink(struct ntvfs_module_context *ntvfs, 
-                           struct ntvfs_request *req, struct smb_unlink *unl)
+                           struct ntvfs_request *req, union smb_unlink *unl)
 {
        struct cvfs_private *private = ntvfs->private_data;
        struct smbcli_request *c_req;
@@ -292,7 +292,7 @@ static NTSTATUS cvfs_ioctl(struct ntvfs_module_context *ntvfs,
   check if a directory exists
 */
 static NTSTATUS cvfs_chkpath(struct ntvfs_module_context *ntvfs, 
-                               struct ntvfs_request *req, struct smb_chkpath *cp)
+                               struct ntvfs_request *req, union smb_chkpath *cp)
 {
        struct cvfs_private *private = ntvfs->private_data;
        struct smbcli_request *c_req;
@@ -583,7 +583,8 @@ static void async_seek(struct smbcli_request *c_req)
   seek in a file
 */
 static NTSTATUS cvfs_seek(struct ntvfs_module_context *ntvfs, 
-                         struct ntvfs_request *req, struct smb_seek *io)
+                         struct ntvfs_request *req,
+                         union smb_seek *io)
 {
        struct cvfs_private *private = ntvfs->private_data;
        struct smbcli_request *c_req;
@@ -603,7 +604,8 @@ static NTSTATUS cvfs_seek(struct ntvfs_module_context *ntvfs,
   flush a file
 */
 static NTSTATUS cvfs_flush(struct ntvfs_module_context *ntvfs, 
-                          struct ntvfs_request *req, struct smb_flush *io)
+                          struct ntvfs_request *req,
+                          union smb_flush *io)
 {
        struct cvfs_private *private = ntvfs->private_data;
        struct smbcli_request *c_req;
@@ -844,7 +846,8 @@ static void async_trans2(struct smbcli_request *c_req)
 
 /* raw trans2 */
 static NTSTATUS cvfs_trans2(struct ntvfs_module_context *ntvfs, 
-                               struct ntvfs_request *req, struct smb_trans2 *trans2)
+                           struct ntvfs_request *req,
+                           struct smb_trans2 *trans2)
 {
        struct cvfs_private *private = ntvfs->private_data;
        struct smbcli_request *c_req;
@@ -863,7 +866,8 @@ static NTSTATUS cvfs_trans2(struct ntvfs_module_context *ntvfs,
 
 /* SMBtrans - not used on file shares */
 static NTSTATUS cvfs_trans(struct ntvfs_module_context *ntvfs, 
-                               struct ntvfs_request *req, struct smb_trans2 *trans2)
+                          struct ntvfs_request *req,
+                          struct smb_trans2 *trans2)
 {
        return NT_STATUS_ACCESS_DENIED;
 }
@@ -881,7 +885,8 @@ static void async_changenotify(struct smbcli_request *c_req)
 
 /* change notify request - always async */
 static NTSTATUS cvfs_notify(struct ntvfs_module_context *ntvfs, 
-                           struct ntvfs_request *req, struct smb_notify *info)
+                           struct ntvfs_request *req,
+                           union smb_notify *info)
 {
        struct cvfs_private *private = ntvfs->private_data;
        struct smbcli_request *c_req;
index 36f0c9b82ca625f105ffcb19626e4c3fe7b8649b..2df7ac61ab938bfec0f41b3831e3fbdcd05e8cc0 100644 (file)
@@ -117,7 +117,8 @@ static NTSTATUS ipc_disconnect(struct ntvfs_module_context *ntvfs)
   delete a file
 */
 static NTSTATUS ipc_unlink(struct ntvfs_module_context *ntvfs,
-                          struct ntvfs_request *req, struct smb_unlink *unl)
+                          struct ntvfs_request *req,
+                          union smb_unlink *unl)
 {
        return NT_STATUS_ACCESS_DENIED;
 }
@@ -136,7 +137,8 @@ static NTSTATUS ipc_ioctl(struct ntvfs_module_context *ntvfs,
   check if a directory exists
 */
 static NTSTATUS ipc_chkpath(struct ntvfs_module_context *ntvfs,
-                           struct ntvfs_request *req, struct smb_chkpath *cp)
+                           struct ntvfs_request *req,
+                           union smb_chkpath *cp)
 {
        return NT_STATUS_ACCESS_DENIED;
 }
@@ -263,7 +265,7 @@ static NTSTATUS ipc_open_ntcreatex(struct ntvfs_module_context *ntvfs,
        }
 
        ZERO_STRUCT(oi->ntcreatex.out);
-       oi->ntcreatex.out.fnum = p->fnum;
+       oi->ntcreatex.file.fnum = p->fnum;
        oi->ntcreatex.out.ipc_state = p->ipc_state;
        oi->ntcreatex.out.file_type = FILE_TYPE_MESSAGE_MODE_PIPE;
 
@@ -286,7 +288,7 @@ static NTSTATUS ipc_open_openx(struct ntvfs_module_context *ntvfs,
        }
 
        ZERO_STRUCT(oi->openx.out);
-       oi->openx.out.fnum = p->fnum;
+       oi->openx.file.fnum = p->fnum;
        oi->openx.out.ftype = 2;
        oi->openx.out.devstate = p->ipc_state;
        
@@ -380,7 +382,7 @@ static NTSTATUS ipc_read(struct ntvfs_module_context *ntvfs,
                return ntvfs_map_read(ntvfs, req, rd);
        }
 
-       fnum = rd->readx.in.fnum;
+       fnum = rd->readx.file.fnum;
 
        p = pipe_state_find(private, fnum);
        if (!p) {
@@ -423,7 +425,7 @@ static NTSTATUS ipc_write(struct ntvfs_module_context *ntvfs,
                return ntvfs_map_write(ntvfs, req, wr);
        }
 
-       fnum = wr->writex.in.fnum;
+       fnum = wr->writex.file.fnum;
        data.data = discard_const_p(void, wr->writex.in.data);
        data.length = wr->writex.in.count;
 
@@ -447,7 +449,8 @@ static NTSTATUS ipc_write(struct ntvfs_module_context *ntvfs,
   seek in a file
 */
 static NTSTATUS ipc_seek(struct ntvfs_module_context *ntvfs,
-                        struct ntvfs_request *req, struct smb_seek *io)
+                        struct ntvfs_request *req,
+                        union smb_seek *io)
 {
        return NT_STATUS_ACCESS_DENIED;
 }
@@ -456,7 +459,8 @@ static NTSTATUS ipc_seek(struct ntvfs_module_context *ntvfs,
   flush a file
 */
 static NTSTATUS ipc_flush(struct ntvfs_module_context *ntvfs,
-                         struct ntvfs_request *req, struct smb_flush *io)
+                         struct ntvfs_request *req,
+                         union smb_flush *io)
 {
        return NT_STATUS_ACCESS_DENIED;
 }
@@ -474,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.in.fnum);
+       p = pipe_state_find(private, io->close.file.fnum);
        if (!p) {
                return NT_STATUS_INVALID_HANDLE;
        }
index 9647666360c8515e02f67692aef6bfe2716fd60f..b6bce60b08a075be101cd2e3ade6f76acaf3d508 100644 (file)
@@ -141,17 +141,18 @@ static NTSTATUS nbench_disconnect(struct ntvfs_module_context *ntvfs)
 */
 static void nbench_unlink_send(struct ntvfs_request *req)
 {
-       struct smb_unlink *unl = req->async_states->private_data;
+       union smb_unlink *unl = req->async_states->private_data;
 
        nbench_log(req, "Unlink \"%s\" 0x%x %s\n", 
-                  unl->in.pattern, unl->in.attrib, 
+                  unl->unlink.in.pattern, unl->unlink.in.attrib, 
                   get_nt_error_c_code(req->async_states->status));
 
        PASS_THRU_REP_POST(req);
 }
 
 static NTSTATUS nbench_unlink(struct ntvfs_module_context *ntvfs,
-                             struct ntvfs_request *req, struct smb_unlink *unl)
+                             struct ntvfs_request *req,
+                             union smb_unlink *unl)
 {
        NTSTATUS status;
 
@@ -185,17 +186,18 @@ static NTSTATUS nbench_ioctl(struct ntvfs_module_context *ntvfs,
 */
 static void nbench_chkpath_send(struct ntvfs_request *req)
 {
-       struct smb_chkpath *cp = req->async_states->private_data;
+       union smb_chkpath *cp = req->async_states->private_data;
 
        nbench_log(req, "Chkpath \"%s\" %s\n", 
-                  cp->in.path, 
+                  cp->chkpath.in.path, 
                   get_nt_error_c_code(req->async_states->status));
 
        PASS_THRU_REP_POST(req);
 }
 
 static NTSTATUS nbench_chkpath(struct ntvfs_module_context *ntvfs,
-                              struct ntvfs_request *req, struct smb_chkpath *cp)
+                              struct ntvfs_request *req,
+                              union smb_chkpath *cp)
 {
        NTSTATUS status;
 
@@ -212,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.in.fname
+                  info->generic.file.path
                   info->generic.level,
                   get_nt_error_c_code(req->async_states->status));
 
@@ -237,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.in.fnum, 
+                  info->generic.file.fnum, 
                   info->generic.level,
                   get_nt_error_c_code(req->async_states->status));
 
@@ -262,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.fname
+                  st->generic.file.path
                   st->generic.level,
                   get_nt_error_c_code(req->async_states->status));
 
@@ -295,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.out.fnum,
+                          io->ntcreatex.file.fnum,
                           get_nt_error_c_code(req->async_states->status));
                break;
 
@@ -429,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.in.fnum, 
+                          rd->readx.file.fnum, 
                           (int)rd->readx.in.offset,
                           rd->readx.in.maxcnt,
                           rd->readx.out.nread,
@@ -467,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.in.fnum, 
+                          wr->writex.file.fnum, 
                           (int)wr->writex.in.offset,
                           wr->writex.in.count,
                           wr->writex.out.nwritten,
@@ -479,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.in.fnum, 
+                          wr->write.file.fnum, 
                           wr->write.in.offset,
                           wr->write.in.count,
                           wr->write.out.nwritten,
@@ -516,7 +518,8 @@ static void nbench_seek_send(struct ntvfs_request *req)
 }
 
 static NTSTATUS nbench_seek(struct ntvfs_module_context *ntvfs,
-                           struct ntvfs_request *req, struct smb_seek *io)
+                           struct ntvfs_request *req,
+                           union smb_seek *io)
 {
        NTSTATUS status;
 
@@ -530,17 +533,18 @@ static NTSTATUS nbench_seek(struct ntvfs_module_context *ntvfs,
 */
 static void nbench_flush_send(struct ntvfs_request *req)
 {
-       struct smb_flush *io = req->async_states->private_data;
+       union smb_flush *io = req->async_states->private_data;
 
        nbench_log(req, "Flush %d %s\n",
-                  io->in.fnum,
+                  io->flush.file.fnum,
                   get_nt_error_c_code(req->async_states->status));
 
        PASS_THRU_REP_POST(req);
 }
 
 static NTSTATUS nbench_flush(struct ntvfs_module_context *ntvfs,
-                            struct ntvfs_request *req, struct smb_flush *io)
+                            struct ntvfs_request *req,
+                            union smb_flush *io)
 {
        NTSTATUS status;
 
@@ -559,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.in.fnum,
+                          io->close.file.fnum,
                           get_nt_error_c_code(req->async_states->status));
                break;
 
@@ -674,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.in.fnum,
+                          lck->lockx.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.in.fnum,
+                          lck->lockx.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));
index 46d288c85351909bbaabab3406ca4d920366d96e..b9b09890f909c41ec05e2f384973ce45411bda2f 100644 (file)
@@ -57,10 +57,10 @@ struct ntvfs_ops {
        /* path operations */
        NTSTATUS (*unlink)(struct ntvfs_module_context *ntvfs,
                           struct ntvfs_request *req,
-                          struct smb_unlink *unl);
+                          union smb_unlink *unl);
        NTSTATUS (*chkpath)(struct ntvfs_module_context *ntvfs,
                            struct ntvfs_request *req,
-                           struct smb_chkpath *cp);
+                           union smb_chkpath *cp);
        NTSTATUS (*qpathinfo)(struct ntvfs_module_context *ntvfs,
                              struct ntvfs_request *req,
                              union smb_fileinfo *st);
@@ -108,10 +108,10 @@ struct ntvfs_ops {
                          union smb_write *io);
        NTSTATUS (*seek)(struct ntvfs_module_context *ntvfs,
                         struct ntvfs_request *req,
-                        struct smb_seek *io);
+                        union smb_seek *io);
        NTSTATUS (*flush)(struct ntvfs_module_context *ntvfs,
                          struct ntvfs_request *req,
-                         struct smb_flush *flush);
+                         union smb_flush *flush);
        NTSTATUS (*lock)(struct ntvfs_module_context *ntvfs,
                         struct ntvfs_request *req,
                         union smb_lock *lck);
@@ -138,7 +138,7 @@ struct ntvfs_ops {
        /* change notify request */
        NTSTATUS (*notify)(struct ntvfs_module_context *ntvfs,
                           struct ntvfs_request *req,
-                          struct smb_notify *info);
+                          union smb_notify *info);
 
        /* cancel - cancels any pending async request */
        NTSTATUS (*cancel)(struct ntvfs_module_context *ntvfs,
index 5133f63268acd75a60b8d756cff6d5bc8cfb4433..e373c7a28ec41a9342c9fcf78d95a93d96877ad4 100644 (file)
@@ -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.out.fnum       = io2->generic.out.fnum;
+               io->openold.file.fnum      = io2->generic.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.out.fnum        = io2->generic.out.fnum;
+               io->openx.file.fnum       = io2->generic.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.out.fnum        = io2->generic.out.fnum;
+               io->t2open.file.fnum       = io2->generic.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.out.fnum = io2->generic.out.fnum;
+               io->mknew.file.fnum = io2->generic.file.fnum;
                write_time = io->mknew.in.write_time;
                break;
 
        case RAW_OPEN_CTEMP:
-               io->ctemp.out.fnum  = io2->generic.out.fnum;
-               io->ctemp.out.name = talloc_strdup(req, io2->generic.in.fname + 
-                                                  strlen(io->ctemp.in.directory) + 1);
+               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);
                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.out.fnum;
+               sf->generic.file.fnum       = io2->generic.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.out.fnum;
+               sf->generic.file.fnum        = io2->generic.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.in.fnum = info->generic.in.fnum;
+       info2->generic.file.fnum = info->generic.file.fnum;
 
        /* only used by the simple backend, which doesn't do async */
        req->async_states->state &= ~NTVFS_ASYNC_STATE_MAY_ASYNC;
@@ -894,7 +894,7 @@ _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.in.fname = info->generic.in.fname;
+       info2->generic.file.path = info->generic.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.in.fnum = lck->lock.in.fnum;
+       lck2->generic.file.fnum = lck->lock.file.fnum;
        lck2->generic.in.mode = 0;
        lck2->generic.in.timeout = 0;
        lck2->generic.in.locks = locks;
@@ -991,7 +991,7 @@ static NTSTATUS ntvfs_map_write_finish(struct ntvfs_module_context *ntvfs,
                }
 
                lck->unlock.level      = RAW_LOCK_UNLOCK;
-               lck->unlock.in.fnum    = wr->writeunlock.in.fnum;
+               lck->unlock.file.fnum  = wr->writeunlock.file.fnum;
                lck->unlock.in.count   = wr->writeunlock.in.count;
                lck->unlock.in.offset  = wr->writeunlock.in.offset;
 
@@ -1013,7 +1013,7 @@ static NTSTATUS ntvfs_map_write_finish(struct ntvfs_module_context *ntvfs,
                }
 
                cl->close.level           = RAW_CLOSE_CLOSE;
-               cl->close.in.fnum         = wr->writeclose.in.fnum;
+               cl->close.file.fnum         = wr->writeclose.file.fnum;
                cl->close.in.write_time   = wr->writeclose.in.mtime;
 
                if (wr2->generic.in.count != 0) {
@@ -1064,7 +1064,7 @@ _PUBLIC_ NTSTATUS ntvfs_map_write(struct ntvfs_module_context *ntvfs,
                break;
 
        case RAW_WRITE_WRITE:
-               wr2->writex.in.fnum      = wr->write.in.fnum;
+               wr2->writex.file.fnum    = wr->write.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.in.fnum      = wr->writeunlock.in.fnum;
+               wr2->writex.file.fnum    = wr->writeunlock.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.in.fnum      = wr->writeclose.in.fnum;
+               wr2->writex.file.fnum    = wr->writeclose.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.in.fnum      = wr->splwrite.in.fnum;
+               wr2->writex.file.fnum    = wr->splwrite.file.fnum;
                wr2->writex.in.offset    = 0;
                wr2->writex.in.wmode     = 0;
                wr2->writex.in.remaining = 0;
@@ -1165,7 +1165,7 @@ _PUBLIC_ NTSTATUS ntvfs_map_read(struct ntvfs_module_context *ntvfs,
                break;
 
        case RAW_READ_READ:
-               rd2->readx.in.fnum      = rd->read.in.fnum;
+               rd2->readx.file.fnum    = rd->read.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;
@@ -1175,7 +1175,7 @@ _PUBLIC_ NTSTATUS ntvfs_map_read(struct ntvfs_module_context *ntvfs,
                break;
 
        case RAW_READ_READBRAW:
-               rd2->readx.in.fnum      = rd->readbraw.in.fnum;
+               rd2->readx.file.fnum    = rd->readbraw.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,13 +1195,13 @@ _PUBLIC_ NTSTATUS ntvfs_map_read(struct ntvfs_module_context *ntvfs,
                        goto done;
                }
                lck->lock.level      = RAW_LOCK_LOCK;
-               lck->lock.in.fnum    = rd->lockread.in.fnum;
+               lck->lock.file.fnum  = rd->lockread.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.in.fnum      = rd->lockread.in.fnum;
+               rd2->readx.file.fnum    = rd->lockread.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;
@@ -1238,8 +1238,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.in.fnum = cl->splclose.in.fnum;
+               cl2->close.level     = RAW_CLOSE_CLOSE;
+               cl2->close.file.fnum = cl->splclose.file.fnum;
                break;
        }
 
index 2be3170bd8d789a0bced1592a8c1a02833d3eeff..68166e51329e8e0c83beefd7a2bd5b56521de554 100644 (file)
@@ -68,7 +68,7 @@ _PUBLIC_ NTSTATUS ntvfs_fsinfo(struct ntvfs_request *req, union smb_fsinfo *fs)
 }
 
 /* path operations */
-_PUBLIC_ NTSTATUS ntvfs_unlink(struct ntvfs_request *req, struct smb_unlink *unl)
+_PUBLIC_ NTSTATUS ntvfs_unlink(struct ntvfs_request *req, union smb_unlink *unl)
 {
        struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
        if (!ntvfs->ops->unlink) {
@@ -77,7 +77,7 @@ _PUBLIC_ NTSTATUS ntvfs_unlink(struct ntvfs_request *req, struct smb_unlink *unl
        return ntvfs->ops->unlink(ntvfs, req, unl);
 }
 
-_PUBLIC_ NTSTATUS ntvfs_chkpath(struct ntvfs_request *req, struct smb_chkpath *cp)
+_PUBLIC_ NTSTATUS ntvfs_chkpath(struct ntvfs_request *req, union smb_chkpath *cp)
 {
        struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
        if (!ntvfs->ops->chkpath) {
@@ -207,7 +207,7 @@ _PUBLIC_ NTSTATUS ntvfs_write(struct ntvfs_request *req, union smb_write *io)
        return ntvfs->ops->write(ntvfs, req, io);
 }
 
-_PUBLIC_ NTSTATUS ntvfs_seek(struct ntvfs_request *req, struct smb_seek *io)
+_PUBLIC_ NTSTATUS ntvfs_seek(struct ntvfs_request *req, union smb_seek *io)
 {
        struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
        if (!ntvfs->ops->seek) {
@@ -217,7 +217,7 @@ _PUBLIC_ NTSTATUS ntvfs_seek(struct ntvfs_request *req, struct smb_seek *io)
 }
 
 _PUBLIC_ NTSTATUS ntvfs_flush(struct ntvfs_request *req,
-                             struct smb_flush *flush)
+                             union smb_flush *flush)
 {
        struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
        if (!ntvfs->ops->flush) {
@@ -314,7 +314,7 @@ _PUBLIC_ NTSTATUS ntvfs_exit(struct ntvfs_request *req)
 /*
   change notify request
 */
-_PUBLIC_ NTSTATUS ntvfs_notify(struct ntvfs_request *req, struct smb_notify *info)
+_PUBLIC_ NTSTATUS ntvfs_notify(struct ntvfs_request *req, union smb_notify *info)
 {
        struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
        if (!ntvfs->ops->notify) {
@@ -378,7 +378,7 @@ _PUBLIC_ NTSTATUS ntvfs_next_fsinfo(struct ntvfs_module_context *ntvfs,
 /* path operations */
 _PUBLIC_ NTSTATUS ntvfs_next_unlink(struct ntvfs_module_context *ntvfs, 
                                    struct ntvfs_request *req,
-                                   struct smb_unlink *unl)
+                                   union smb_unlink *unl)
 {
        if (!ntvfs->next || !ntvfs->next->ops->unlink) {
                return NT_STATUS_NOT_IMPLEMENTED;
@@ -388,7 +388,7 @@ _PUBLIC_ NTSTATUS ntvfs_next_unlink(struct ntvfs_module_context *ntvfs,
 
 _PUBLIC_ NTSTATUS ntvfs_next_chkpath(struct ntvfs_module_context *ntvfs, 
                                     struct ntvfs_request *req,
-                                    struct smb_chkpath *cp)
+                                    union smb_chkpath *cp)
 {
        if (!ntvfs->next || !ntvfs->next->ops->chkpath) {
                return NT_STATUS_NOT_IMPLEMENTED;
@@ -533,7 +533,7 @@ _PUBLIC_ NTSTATUS ntvfs_next_write(struct ntvfs_module_context *ntvfs,
 
 _PUBLIC_ NTSTATUS ntvfs_next_seek(struct ntvfs_module_context *ntvfs, 
                                  struct ntvfs_request *req,
-                                 struct smb_seek *io)
+                                 union smb_seek *io)
 {
        if (!ntvfs->next || !ntvfs->next->ops->seek) {
                return NT_STATUS_NOT_IMPLEMENTED;
@@ -543,7 +543,7 @@ _PUBLIC_ NTSTATUS ntvfs_next_seek(struct ntvfs_module_context *ntvfs,
 
 _PUBLIC_ NTSTATUS ntvfs_next_flush(struct ntvfs_module_context *ntvfs, 
                                   struct ntvfs_request *req,
-                                  struct smb_flush *flush)
+                                  union smb_flush *flush)
 {
        if (!ntvfs->next || !ntvfs->next->ops->flush) {
                return NT_STATUS_NOT_IMPLEMENTED;
@@ -618,7 +618,7 @@ _PUBLIC_ NTSTATUS ntvfs_next_trans2(struct ntvfs_module_context *ntvfs,
 */
 _PUBLIC_ NTSTATUS ntvfs_next_notify(struct ntvfs_module_context *ntvfs,
                                    struct ntvfs_request *req,
-                                   struct smb_notify *info)
+                                   union smb_notify *info)
 {
        if (!ntvfs->next || !ntvfs->next->ops->notify) {
                return NT_STATUS_NOT_IMPLEMENTED;
index a03499b7337a4530b0ab14b591692afb023bb50d..246290ae913e35c190241c926b8bfb9ef3fbea17 100644 (file)
@@ -310,7 +310,7 @@ NTSTATUS pvfs_acl_query(struct pvfs_state *pvfs,
                return NT_STATUS_INVALID_ACL;
        }
 
-       normalise_sd_flags(sd, info->query_secdesc.secinfo_flags);
+       normalise_sd_flags(sd, info->query_secdesc.in.secinfo_flags);
 
        info->query_secdesc.out.sd = sd;
 
index bf6e23d520a57f34d0809ee77165e691908b8cbc..f0ab02f96b8825be59d054c8d8be0c253b55fa52 100644 (file)
@@ -40,13 +40,14 @@ static void pvfs_flush_file(struct pvfs_state *pvfs, struct pvfs_file *f)
   flush a fnum
 */
 NTSTATUS pvfs_flush(struct ntvfs_module_context *ntvfs,
-                   struct ntvfs_request *req, struct smb_flush *io)
+                   struct ntvfs_request *req,
+                   union smb_flush *io)
 {
        struct pvfs_state *pvfs = ntvfs->private_data;
        struct pvfs_file *f;
 
-       if (io->in.fnum != 0xFFFF) {
-               f = pvfs_find_fd(pvfs, req, io->in.fnum);
+       if (io->flush.file.fnum != 0xFFFF) {
+               f = pvfs_find_fd(pvfs, req, io->flush.file.fnum);
                if (!f) {
                        return NT_STATUS_INVALID_HANDLE;
                }
index aaa9db9986c31c8b3a83cc765967ba9e021d02cf..032aec1d8d82c68a9d951f70904bc64a2906f853 100644 (file)
@@ -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.in.fnum);
+       f = pvfs_find_fd(pvfs, req, io->ntioctl.file.fnum);
        if (!f) {
                return NT_STATUS_INVALID_HANDLE;
        }
@@ -62,7 +62,8 @@ static NTSTATUS pvfs_ntioctl(struct ntvfs_module_context *ntvfs,
   ioctl interface 
 */
 NTSTATUS pvfs_ioctl(struct ntvfs_module_context *ntvfs,
-                   struct ntvfs_request *req, union smb_ioctl *io)
+                   struct ntvfs_request *req,
+                   union smb_ioctl *io)
 {
        NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
 
index d2317c185299a7a8071a1117ed4e60fbbf8ff777..b9b9832d5109037ba01694ea285c1dc5b37c0498 100644 (file)
@@ -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.in.fnum      == lck->lockx.in.fnum &&
+                   p->lck->lockx.file.fnum    == lck->lockx.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.in.fnum);
+       f = pvfs_find_fd(pvfs, req, lck->lockx.file.fnum);
        if (!f) {
                return NT_STATUS_INVALID_HANDLE;
        }
index 618ddf141b4aae298827c95b7cb80f61b144ec66..fcae5f8d6102115b14727d9f6d956eefc0544eab 100644 (file)
@@ -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.out.fnum          = f->fnum;
+       io->generic.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.out.fnum          = f->fnum;
+       io->generic.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.out.fnum          = f->fnum;
+       io->generic.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.out.fnum          = f->fnum;
+       io->generic.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.in.fnum);
+       f = pvfs_find_fd(pvfs, req, io->close.file.fnum);
        if (!f) {
                return NT_STATUS_INVALID_HANDLE;
        }
index 5d908cbee28dff83d91bcb0a0ac1d13c131c5898..b01b7bb649b96017d5e3a6ea2492b3b897485957 100644 (file)
@@ -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.in.fname, PVFS_RESOLVE_STREAMS, &name);
+       status = pvfs_resolve_name(pvfs, req, info->generic.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.in.fnum);
+       f = pvfs_find_fd(pvfs, req, info->generic.file.fnum);
        if (!f) {
                return NT_STATUS_INVALID_HANDLE;
        }
index 93a80609266477d649838557cd1f2a5122074f3f..15c9111d6172a5d59aae779c04514937d08d193d 100644 (file)
@@ -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.in.fnum);
+       f = pvfs_find_fd(pvfs, req, rd->readx.file.fnum);
        if (!f) {
                return NT_STATUS_INVALID_HANDLE;
        }
index 33656e4004808603446e67ff06eafdb16bde10b8..1d43f2c8550752f70fb70db5fdceb8ec0215538d 100644 (file)
   seek in a file
 */
 NTSTATUS pvfs_seek(struct ntvfs_module_context *ntvfs,
-                  struct ntvfs_request *req, struct smb_seek *io)
+                  struct ntvfs_request *req,
+                  union smb_seek *io)
 {
        struct pvfs_state *pvfs = ntvfs->private_data;
        struct pvfs_file *f;
        struct pvfs_file_handle *h;
        NTSTATUS status;
 
-       f = pvfs_find_fd(pvfs, req, io->in.fnum);
+       f = pvfs_find_fd(pvfs, req, io->lseek.file.fnum);
        if (!f) {
                return NT_STATUS_INVALID_HANDLE;
        }
@@ -42,22 +43,22 @@ NTSTATUS pvfs_seek(struct ntvfs_module_context *ntvfs,
 
        status = NT_STATUS_OK;
 
-       switch (io->in.mode) {
+       switch (io->lseek.in.mode) {
        case SEEK_MODE_START:
-               h->seek_offset = io->in.offset;
+               h->seek_offset = io->lseek.in.offset;
                break;
 
        case SEEK_MODE_CURRENT:
-               h->seek_offset += io->in.offset;
+               h->seek_offset += io->lseek.in.offset;
                break;
 
        case SEEK_MODE_END:
                status = pvfs_resolve_name_fd(pvfs, h->fd, h->name);
-               h->seek_offset = h->name->st.st_size + io->in.offset;
+               h->seek_offset = h->name->st.st_size + io->lseek.in.offset;
                break;
        }
 
-       io->out.offset = h->seek_offset;
+       io->lseek.out.offset = h->seek_offset;
 
        return status;
 }
index ee90adba4552c50d72c71bb2577da1e6ff97e359..76c9bc10a408881033dc067bbecbd4d832b92694 100644 (file)
@@ -113,7 +113,8 @@ static NTSTATUS pvfs_unlink_one(struct pvfs_state *pvfs,
   The name can contain CIFS wildcards, but rarely does (except with OS/2 clients)
 */
 NTSTATUS pvfs_unlink(struct ntvfs_module_context *ntvfs,
-                    struct ntvfs_request *req, struct smb_unlink *unl)
+                    struct ntvfs_request *req,
+                    union smb_unlink *unl)
 {
        struct pvfs_state *pvfs = ntvfs->private_data;
        struct pvfs_dir *dir;
@@ -124,7 +125,7 @@ NTSTATUS pvfs_unlink(struct ntvfs_module_context *ntvfs,
        uint_t ofs;
 
        /* resolve the cifs name to a posix name */
-       status = pvfs_resolve_name(pvfs, req, unl->in.pattern, 
+       status = pvfs_resolve_name(pvfs, req, unl->unlink.in.pattern, 
                                   PVFS_RESOLVE_WILDCARD | PVFS_RESOLVE_STREAMS, &name);
        if (!NT_STATUS_IS_OK(status)) {
                return status;
@@ -140,7 +141,7 @@ NTSTATUS pvfs_unlink(struct ntvfs_module_context *ntvfs,
        }
 
        if (name->stream_name) {
-               return pvfs_unlink_stream(pvfs, req, name, unl->in.attrib);
+               return pvfs_unlink_stream(pvfs, req, name, unl->unlink.in.attrib);
        }
 
        /* get list of matching files */
@@ -155,13 +156,13 @@ NTSTATUS pvfs_unlink(struct ntvfs_module_context *ntvfs,
 
        while ((fname = pvfs_list_next(dir, &ofs))) {
                /* this seems to be a special case */
-               if ((unl->in.attrib & FILE_ATTRIBUTE_DIRECTORY) &&
+               if ((unl->unlink.in.attrib & FILE_ATTRIBUTE_DIRECTORY) &&
                    (strcmp(fname, ".") == 0 ||
                     strcmp(fname, "..") == 0)) {
                        return NT_STATUS_OBJECT_NAME_INVALID;
                }
 
-               status = pvfs_unlink_one(pvfs, req, pvfs_list_unix_path(dir), fname, unl->in.attrib);
+               status = pvfs_unlink_one(pvfs, req, pvfs_list_unix_path(dir), fname, unl->unlink.in.attrib);
                if (NT_STATUS_IS_OK(status)) {
                        total_deleted++;
                }
index d206e3b830b304d18492903d04f9f429a662bb1b..c16b66b7cc6b5b5b5033e7871e12a248fa1e7cf5 100644 (file)
@@ -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.in.fnum);
+       f = pvfs_find_fd(pvfs, req, wr->writex.file.fnum);
        if (!f) {
                return NT_STATUS_INVALID_HANDLE;
        }
index 66fbc4bb4c1b83cd4a46bfedb0d4eba5fa546fa3..ba53dc65e0b31851115fa1bed942219c95409515 100644 (file)
@@ -203,14 +203,15 @@ static NTSTATUS pvfs_disconnect(struct ntvfs_module_context *ntvfs)
   check if a directory exists
 */
 static NTSTATUS pvfs_chkpath(struct ntvfs_module_context *ntvfs,
-                            struct ntvfs_request *req, struct smb_chkpath *cp)
+                            struct ntvfs_request *req,
+                            union smb_chkpath *cp)
 {
        struct pvfs_state *pvfs = ntvfs->private_data;
        struct pvfs_filename *name;
        NTSTATUS status;
 
        /* resolve the cifs name to a posix name */
-       status = pvfs_resolve_name(pvfs, req, cp->in.path, 0, &name);
+       status = pvfs_resolve_name(pvfs, req, cp->chkpath.in.path, 0, &name);
        NT_STATUS_NOT_OK_RETURN(status);
 
        if (!name->exists) {
index 1c7699566d2bed64e0c0bf01b90762307c59b7d2..eb17ef9c63bc4294638c0b76a454f8d5f1cab470 100644 (file)
@@ -58,7 +58,8 @@ static NTSTATUS print_disconnect(struct ntvfs_module_context *ntvfs)
   lots of operations are not allowed on printing shares - mostly return NT_STATUS_ACCESS_DENIED
 */
 static NTSTATUS print_unlink(struct ntvfs_module_context *ntvfs,
-                            struct ntvfs_request *req, struct smb_unlink *unl)
+                            struct ntvfs_request *req,
+                            union smb_unlink *unl)
 {
        return NT_STATUS_ACCESS_DENIED;
 }
index be9a680d5b2f60b3033f38f4086ce42ff23c19dd..add0c54291bfb1d051f82db21b91a934e17a3f49 100644 (file)
@@ -106,13 +106,14 @@ static struct svfs_file *find_fd(struct svfs_private *private, int fd)
   The name can contain CIFS wildcards, but rarely does (except with OS/2 clients)
 */
 static NTSTATUS svfs_unlink(struct ntvfs_module_context *ntvfs,
-                           struct ntvfs_request *req, struct smb_unlink *unl)
+                           struct ntvfs_request *req,
+                           union smb_unlink *unl)
 {
        char *unix_path;
 
        CHECK_READ_ONLY(req);
 
-       unix_path = svfs_unix_path(ntvfs, req, unl->in.pattern);
+       unix_path = svfs_unix_path(ntvfs, req, unl->unlink.in.pattern);
 
        /* ignoring wildcards ... */
        if (unlink(unix_path) == -1) {
@@ -136,12 +137,13 @@ static NTSTATUS svfs_ioctl(struct ntvfs_module_context *ntvfs,
   check if a directory exists
 */
 static NTSTATUS svfs_chkpath(struct ntvfs_module_context *ntvfs,
-                            struct ntvfs_request *req, struct smb_chkpath *cp)
+                            struct ntvfs_request *req,
+                            union smb_chkpath *cp)
 {
        char *unix_path;
        struct stat st;
 
-       unix_path = svfs_unix_path(ntvfs, req, cp->in.path);
+       unix_path = svfs_unix_path(ntvfs, req, cp->chkpath.in.path);
 
        if (stat(unix_path, &st) == -1) {
                return map_nt_error_from_unix(errno);
@@ -250,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.in.fname, info->generic.level));
+       DEBUG(19,("svfs_qpathinfo: file %s level 0x%x\n", info->generic.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.in.fname);
+       unix_path = svfs_unix_path(ntvfs, req, info->generic.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));
@@ -279,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.in.fnum);
+       f = find_fd(private, info->generic.file.fnum);
        if (!f) {
                return NT_STATUS_INVALID_HANDLE;
        }
        
-       if (fstat(info->generic.in.fnum, &st) == -1) {
+       if (fstat(info->generic.file.fnum, &st) == -1) {
                return map_nt_error_from_unix(errno);
        }
 
@@ -386,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.out.fnum = fd;
+       io->generic.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);
@@ -482,7 +484,7 @@ static NTSTATUS svfs_read(struct ntvfs_module_context *ntvfs,
                return NT_STATUS_NOT_SUPPORTED;
        }
 
-       ret = pread(rd->readx.in.fnum, 
+       ret = pread(rd->readx.file.fnum, 
                    rd->readx.out.data, 
                    rd->readx.in.maxcnt,
                    rd->readx.in.offset);
@@ -511,7 +513,7 @@ static NTSTATUS svfs_write(struct ntvfs_module_context *ntvfs,
 
        CHECK_READ_ONLY(req);
 
-       ret = pwrite(wr->writex.in.fnum, 
+       ret = pwrite(wr->writex.file.fnum, 
                     wr->writex.in.data, 
                     wr->writex.in.count,
                     wr->writex.in.offset);
@@ -529,7 +531,8 @@ static NTSTATUS svfs_write(struct ntvfs_module_context *ntvfs,
   seek in a file
 */
 static NTSTATUS svfs_seek(struct ntvfs_module_context *ntvfs,
-                         struct ntvfs_request *req, struct smb_seek *io)
+                         struct ntvfs_request *req,
+                         union smb_seek *io)
 {
        return NT_STATUS_NOT_SUPPORTED;
 }
@@ -538,9 +541,10 @@ static NTSTATUS svfs_seek(struct ntvfs_module_context *ntvfs,
   flush a file
 */
 static NTSTATUS svfs_flush(struct ntvfs_module_context *ntvfs,
-                          struct ntvfs_request *req, struct smb_flush *io)
+                          struct ntvfs_request *req,
+                          union smb_flush *io)
 {
-       fsync(io->in.fnum);
+       fsync(io->flush.file.fnum);
        return NT_STATUS_OK;
 }
 
@@ -548,7 +552,8 @@ static NTSTATUS svfs_flush(struct ntvfs_module_context *ntvfs,
   close a file
 */
 static NTSTATUS svfs_close(struct ntvfs_module_context *ntvfs,
-                          struct ntvfs_request *req, union smb_close *io)
+                          struct ntvfs_request *req,
+                          union smb_close *io)
 {
        struct svfs_private *private = ntvfs->private_data;
        struct svfs_file *f;
@@ -558,12 +563,12 @@ static NTSTATUS svfs_close(struct ntvfs_module_context *ntvfs,
                return NT_STATUS_INVALID_LEVEL;
        }
 
-       f = find_fd(private, io->close.in.fnum);
+       f = find_fd(private, io->close.file.fnum);
        if (!f) {
                return NT_STATUS_INVALID_HANDLE;
        }
 
-       if (close(io->close.in.fnum) == -1) {
+       if (close(io->close.file.fnum) == -1) {
                return map_nt_error_from_unix(errno);
        }
 
index 3b36a6a8916bfd417c1d3bdc8fd1cb9c9e6e7b73..cc7e13fde05fb583701a2d282eab281b1dec19e5 100644 (file)
@@ -250,7 +250,8 @@ static NTSTATUS unixuid_disconnect(struct ntvfs_module_context *ntvfs)
   delete a file
 */
 static NTSTATUS unixuid_unlink(struct ntvfs_module_context *ntvfs,
-                             struct ntvfs_request *req, struct smb_unlink *unl)
+                             struct ntvfs_request *req,
+                             union smb_unlink *unl)
 {
        NTSTATUS status;
 
@@ -276,7 +277,8 @@ static NTSTATUS unixuid_ioctl(struct ntvfs_module_context *ntvfs,
   check if a directory exists
 */
 static NTSTATUS unixuid_chkpath(struct ntvfs_module_context *ntvfs,
-                              struct ntvfs_request *req, struct smb_chkpath *cp)
+                               struct ntvfs_request *req,
+                               union smb_chkpath *cp)
 {
        NTSTATUS status;
 
@@ -420,7 +422,8 @@ static NTSTATUS unixuid_write(struct ntvfs_module_context *ntvfs,
   seek in a file
 */
 static NTSTATUS unixuid_seek(struct ntvfs_module_context *ntvfs,
-                           struct ntvfs_request *req, struct smb_seek *io)
+                            struct ntvfs_request *req,
+                            union smb_seek *io)
 {
        NTSTATUS status;
 
@@ -433,7 +436,8 @@ static NTSTATUS unixuid_seek(struct ntvfs_module_context *ntvfs,
   flush a file
 */
 static NTSTATUS unixuid_flush(struct ntvfs_module_context *ntvfs,
-                            struct ntvfs_request *req, struct smb_flush *io)
+                             struct ntvfs_request *req,
+                             union smb_flush *io)
 {
        NTSTATUS status;
 
index b105932386da273c101d59e0a71b77f46b30afec..846cea979660fd0ef8d8e1ec66f6d8f9da535cc5 100644 (file)
@@ -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.out.fnum);
+       SSVAL(params,        2, io->ntcreatex.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,8 +234,8 @@ 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.in.fnum          = SVAL(trans->in.params.data, 0);
-       io->query_secdesc.secinfo_flags    = IVAL(trans->in.params.data, 4);
+       io->query_secdesc.file.fnum        = SVAL(trans->in.params.data, 0);
+       io->query_secdesc.in.secinfo_flags = IVAL(trans->in.params.data, 4);
 
        op->op_info = io;
        op->send_fn = nttrans_query_sec_desc_send;
@@ -322,7 +322,7 @@ static NTSTATUS nttrans_ioctl(struct smbsrv_request *req,
        blob = &trans->in.data;
 
        nt->ntioctl.level = RAW_IOCTL_NTIOCTL;
-       nt->ntioctl.in.fnum = fnum;
+       nt->ntioctl.file.fnum = fnum;
        nt->ntioctl.in.function = function;
        nt->ntioctl.in.fsctl = fsctl;
        nt->ntioctl.in.filter = filter;
@@ -341,7 +341,7 @@ static NTSTATUS nttrans_ioctl(struct smbsrv_request *req,
  */
 static NTSTATUS nttrans_notify_change_send(struct nttrans_op *op)
 {
-       struct smb_notify *info = talloc_get_type(op->op_info, struct smb_notify);
+       union smb_notify *info = talloc_get_type(op->op_info, union smb_notify);
        size_t size = 0;
        int i;
        NTSTATUS status;
@@ -350,8 +350,8 @@ static NTSTATUS nttrans_notify_change_send(struct nttrans_op *op)
 #define MAX_BYTES_PER_CHAR 3
        
        /* work out how big the reply buffer could be */
-       for (i=0;i<info->out.num_changes;i++) {
-               size += 12 + 3 + (1+strlen(info->out.changes[i].name.s)) * MAX_BYTES_PER_CHAR;
+       for (i=0;i<info->notify.out.num_changes;i++) {
+               size += 12 + 3 + (1+strlen(info->notify.out.changes[i].name.s)) * MAX_BYTES_PER_CHAR;
        }
 
        status = nttrans_setup_reply(op, op->trans, size, 0, 0);
@@ -360,11 +360,11 @@ static NTSTATUS nttrans_notify_change_send(struct nttrans_op *op)
        p = op->trans->out.params.data;
 
        /* construct the changes buffer */
-       for (i=0;i<info->out.num_changes;i++) {
+       for (i=0;i<info->notify.out.num_changes;i++) {
                ssize_t len;
 
-               SIVAL(p, 4, info->out.changes[i].action);
-               len = push_string(p + 12, info->out.changes[i].name.s, 
+               SIVAL(p, 4, info->notify.out.changes[i].action);
+               len = push_string(p + 12, info->notify.out.changes[i].name.s, 
                                  op->trans->out.params.length - (ofs+12), STR_UNICODE);
                SIVAL(p, 8, len);
                
@@ -393,20 +393,20 @@ static NTSTATUS nttrans_notify_change(struct smbsrv_request *req,
                                      struct nttrans_op *op)
 {
        struct smb_nttrans *trans = op->trans;
-       struct smb_notify *info;
+       union smb_notify *info;
 
        /* should have at least 4 setup words */
        if (trans->in.setup_count != 4) {
                return NT_STATUS_INVALID_PARAMETER;
        }
 
-       info = talloc(op, struct smb_notify);
+       info = talloc(op, union smb_notify);
        NT_STATUS_HAVE_NO_MEMORY(info);
 
-       info->in.completion_filter = IVAL(trans->in.setup, 0);
-       info->in.fnum              = SVAL(trans->in.setup, 4);
-       info->in.recursive         = SVAL(trans->in.setup, 6);
-       info->in.buffer_size       = trans->in.max_param;
+       info->notify.in.completion_filter = IVAL(trans->in.setup, 0);
+       info->notify.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;
 
        op->op_info = info;
        op->send_fn = nttrans_notify_change_send;
index 93697afd4aeb255ca62c8d0d5b3dfe0bbdda5ea8..d4c98ab416355069e13368856a88e6eb339f606e 100644 (file)
@@ -236,7 +236,7 @@ void smbsrv_reply_ioctl(struct smbsrv_request *req)
        REQ_TALLOC(io, union smb_ioctl);
 
        io->ioctl.level = RAW_IOCTL_IOCTL;
-       io->ioctl.in.fnum     = req_fnum(req, req->in.vwv, VWV(0));
+       io->ioctl.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;
@@ -255,11 +255,11 @@ void smbsrv_reply_ioctl(struct smbsrv_request *req)
 ****************************************************************************/
 void smbsrv_reply_chkpth(struct smbsrv_request *req)
 {
-       struct smb_chkpath *io;
+       union smb_chkpath *io;
 
-       REQ_TALLOC(io, struct smb_chkpath);
+       REQ_TALLOC(io, union smb_chkpath);
 
-       req_pull_ascii4(req, &io->in.path, req->in.data, STR_TERMINATE);
+       req_pull_ascii4(req, &io->chkpath.in.path, req->in.data, STR_TERMINATE);
 
        req->async_states->state |= NTVFS_ASYNC_STATE_MAY_ASYNC;
        req->async_states->send_fn = reply_simple_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.in.fname, req->in.data, STR_TERMINATE);
-       if (!st->getattr.in.fname) {
+       req_pull_ascii4(req, &st->getattr.file.path, req->in.data, STR_TERMINATE);
+       if (!st->getattr.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.fname, req->in.data, STR_TERMINATE);
+       req_pull_ascii4(req, &st->setattr.file.path, req->in.data, STR_TERMINATE);
 
-       if (!st->setattr.file.fname) {
+       if (!st->setattr.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.out.fnum);
+       SSVAL(req->out.vwv, VWV(0), oi->openold.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.out.fnum);
+       SSVAL(req->out.vwv, VWV(2), oi->openx.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.out.fnum;
+       req->chained_fnum = oi->openx.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.out.fnum);
+       SSVAL(req->out.vwv, VWV(0), oi->mknew.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.out.fnum);
+       SSVAL(req->out.vwv, VWV(0), oi->ctemp.file.fnum);
 
        /* the returned filename is relative to the directory */
        req_push_str(req, NULL, oi->ctemp.out.name, -1, STR_TERMINATE | STR_ASCII);
@@ -644,15 +644,15 @@ void smbsrv_reply_ctemp(struct smbsrv_request *req)
 ****************************************************************************/
 void smbsrv_reply_unlink(struct smbsrv_request *req)
 {
-       struct smb_unlink *unl;
+       union smb_unlink *unl;
 
        /* parse the request */
        REQ_CHECK_WCT(req, 1);
-       REQ_TALLOC(unl, struct smb_unlink);
+       REQ_TALLOC(unl, union smb_unlink);
        
-       unl->in.attrib = SVAL(req->in.vwv, VWV(0));
+       unl->unlink.in.attrib = SVAL(req->in.vwv, VWV(0));
 
-       req_pull_ascii4(req, &unl->in.pattern, req->in.data, STR_TERMINATE);
+       req_pull_ascii4(req, &unl->unlink.in.pattern, req->in.data, STR_TERMINATE);
        
        req->async_states->state |= NTVFS_ASYNC_STATE_MAY_ASYNC;
        req->async_states->send_fn = reply_simple_send;
@@ -682,7 +682,7 @@ void smbsrv_reply_readbraw(struct smbsrv_request *req)
                goto failed;
        }
 
-       io.readbraw.in.fnum    = req_fnum(req, req->in.vwv, VWV(0));
+       io.readbraw.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.in.fnum      = req_fnum(req, req->in.vwv, VWV(0));
+       io->lockread.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.in.fnum          = req_fnum(req, req->in.vwv, VWV(0));
+       io->read.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.in.fnum          = req_fnum(req, req->in.vwv, VWV(2));
+       io->readx.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));
@@ -973,7 +973,7 @@ void smbsrv_reply_writeunlock(struct smbsrv_request *req)
        REQ_TALLOC(io, union smb_write);
 
        io->writeunlock.level = RAW_WRITE_WRITEUNLOCK;
-       io->writeunlock.in.fnum        = req_fnum(req, req->in.vwv, VWV(0));
+       io->writeunlock.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));
@@ -1031,7 +1031,7 @@ void smbsrv_reply_write(struct smbsrv_request *req)
        REQ_TALLOC(io, union smb_write);
 
        io->write.level = RAW_WRITE_WRITE;
-       io->write.in.fnum        = req_fnum(req, req->in.vwv, VWV(0));
+       io->write.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));
@@ -1096,7 +1096,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.in.fnum      = req_fnum(req, req->in.vwv, VWV(2));
+       io->writex.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));
@@ -1132,14 +1132,14 @@ void smbsrv_reply_write_and_X(struct smbsrv_request *req)
 ****************************************************************************/
 static void reply_lseek_send(struct smbsrv_request *req)
 {
-       struct smb_seek *io = req->async_states->private_data;
+       union smb_seek *io = req->async_states->private_data;
 
        CHECK_ASYNC_STATUS;
 
        /* construct reply */
        smbsrv_setup_reply(req, 2, 0);
 
-       SIVALS(req->out.vwv, VWV(0), io->out.offset);
+       SIVALS(req->out.vwv, VWV(0), io->lseek.out.offset);
 
        smbsrv_send_reply(req);
 }
@@ -1149,14 +1149,14 @@ static void reply_lseek_send(struct smbsrv_request *req)
 ****************************************************************************/
 void smbsrv_reply_lseek(struct smbsrv_request *req)
 {
-       struct smb_seek *io;
+       union smb_seek *io;
 
        REQ_CHECK_WCT(req, 4);
-       REQ_TALLOC(io, struct smb_seek);
+       REQ_TALLOC(io, union smb_seek);
 
-       io->in.fnum   = req_fnum(req, req->in.vwv,  VWV(0));
-       io->in.mode   = SVAL(req->in.vwv,  VWV(1));
-       io->in.offset = IVALS(req->in.vwv, VWV(2));
+       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));
 
        req->async_states->state |= NTVFS_ASYNC_STATE_MAY_ASYNC;
        req->async_states->send_fn = reply_lseek_send;
@@ -1173,14 +1173,14 @@ void smbsrv_reply_lseek(struct smbsrv_request *req)
 ****************************************************************************/
 void smbsrv_reply_flush(struct smbsrv_request *req)
 {
-       struct smb_flush *io;
+       union smb_flush *io;
 
        /* parse request */
        REQ_CHECK_WCT(req, 1);
-       REQ_TALLOC(io, struct smb_flush);
+       REQ_TALLOC(io, union smb_flush);
+
+       io->flush.file.fnum   = req_fnum(req, req->in.vwv,  VWV(0));
 
-       io->in.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;
 
@@ -1229,7 +1229,7 @@ void smbsrv_reply_close(struct smbsrv_request *req)
        REQ_TALLOC(io, union smb_close);
 
        io->close.level = RAW_CLOSE_CLOSE;
-       io->close.in.fnum  = req_fnum(req, req->in.vwv,  VWV(0));
+       io->close.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;
@@ -1275,7 +1275,7 @@ void smbsrv_reply_writeclose(struct smbsrv_request *req)
        REQ_TALLOC(io, union smb_write);
 
        io->writeclose.level = RAW_WRITE_WRITECLOSE;
-       io->writeclose.in.fnum   = req_fnum(req, req->in.vwv, VWV(0));
+       io->writeclose.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));
@@ -1309,7 +1309,7 @@ void smbsrv_reply_lock(struct smbsrv_request *req)
        REQ_TALLOC(lck, union smb_lock);
 
        lck->lock.level     = RAW_LOCK_LOCK;
-       lck->lock.in.fnum   = req_fnum(req, req->in.vwv, VWV(0));
+       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));
 
@@ -1335,7 +1335,7 @@ void smbsrv_reply_unlock(struct smbsrv_request *req)
        REQ_TALLOC(lck, union smb_lock);
 
        lck->unlock.level = RAW_LOCK_UNLOCK;
-       lck->unlock.in.fnum   = req_fnum(req, req->in.vwv, VWV(0));
+       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));
 
@@ -1415,7 +1415,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.out.fnum);
+       SSVAL(req->out.vwv, VWV(0), oi->openold.file.fnum);
 
        smbsrv_send_reply(req);
 }
@@ -1459,7 +1459,7 @@ void smbsrv_reply_printclose(struct smbsrv_request *req)
        REQ_TALLOC(io, union smb_close);
 
        io->splclose.level = RAW_CLOSE_SPLCLOSE;
-       io->splclose.in.fnum = req_fnum(req, req->in.vwv,  VWV(0));
+       io->splclose.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;
@@ -1559,7 +1559,7 @@ void smbsrv_reply_printwrite(struct smbsrv_request *req)
                return;
        }
 
-       io->splwrite.in.fnum  = req_fnum(req, req->in.vwv, VWV(0));
+       io->splwrite.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;
 
@@ -1788,7 +1788,7 @@ void smbsrv_reply_lockingX(struct smbsrv_request *req)
        REQ_TALLOC(lck, union smb_lock);
 
        lck->lockx.level = RAW_LOCK_LOCKX;
-       lck->lockx.in.fnum      = req_fnum(req, req->in.vwv, VWV(2));
+       lck->lockx.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));
@@ -1875,7 +1875,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.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));
@@ -1943,7 +1943,7 @@ void smbsrv_reply_getattrE(struct smbsrv_request *req)
        REQ_TALLOC(info, union smb_fileinfo);
 
        info->getattr.level = RAW_FILEINFO_GETATTRE;
-       info->getattr.in.fnum = req_fnum(req, req->in.vwv, VWV(0));
+       info->getattr.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;
@@ -2264,7 +2264,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.out.fnum);
+       SSVAL(req->out.vwv,        5, io->ntcreatex.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);
@@ -2277,7 +2277,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.out.fnum;
+       req->chained_fnum = io->ntcreatex.file.fnum;
 
        smbsrv_chain_reply(req);
 }
index ed53ce4daf66fc6942c996e643a65db1a7cf314f..a02a7416741d217831222180d8bd2f7eb173a888 100644 (file)
@@ -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.out.fnum);
+       SSVAL(trans->out.params.data, VWV(0), io->t2open.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.in.fname, 0);
-       if (st.generic.in.fname == NULL) {
+       trans2_pull_blob_string(req, &trans->in.params, 6, &st.generic.file.path, 0);
+       if (st.generic.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.in.fnum  = SVAL(trans->in.params.data, 0);
+       st.generic.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 */
@@ -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.fname, 0);
-       if (st.generic.file.fname == NULL) {
+       trans2_pull_blob_string(req, &trans->in.params, 6, &st.generic.file.path, 0);
+       if (st.generic.file.path == NULL) {
                return NT_STATUS_FOOBAR;
        }
 
index 2c26f21ddc97af30ae9fcd3bf451e80056f6fa68..2a41508bcc39da5d5a17bc15f995ed59ac851982 100644 (file)
@@ -54,7 +54,7 @@ static BOOL test_delayed_write_update(struct smbcli_state *cli, TALLOC_CTX *mem_
        }
 
        finfo1.basic_info.level = RAW_FILEINFO_BASIC_INFO;
-       finfo1.basic_info.in.fnum = fnum1;
+       finfo1.basic_info.file.fnum = fnum1;
        finfo2 = finfo1;
 
        status = smb_raw_fileinfo(cli->tree, mem_ctx, &finfo1);
@@ -129,7 +129,7 @@ static BOOL test_delayed_write_update2(struct smbcli_state *cli, TALLOC_CTX *mem
        BOOL ret = True;
        ssize_t written;
        time_t t;
-       struct smb_flush flsh;
+       union smb_flush flsh;
 
        printf("Testing delayed update of write time using 2 connections\n");
 
@@ -148,7 +148,7 @@ static BOOL test_delayed_write_update2(struct smbcli_state *cli, TALLOC_CTX *mem
        }
 
        finfo1.basic_info.level = RAW_FILEINFO_BASIC_INFO;
-       finfo1.basic_info.in.fnum = fnum1;
+       finfo1.basic_info.file.fnum = fnum1;
        finfo2 = finfo1;
 
        status = smb_raw_fileinfo(cli->tree, mem_ctx, &finfo1);
@@ -195,7 +195,7 @@ static BOOL test_delayed_write_update2(struct smbcli_state *cli, TALLOC_CTX *mem
        t = time(NULL);
 
        while (time(NULL) < t+120) {
-               finfo2.basic_info.in.fname = fname;
+               finfo2.basic_info.file.path = fname;
        
                status = smb_raw_pathinfo(cli2->tree, mem_ctx, &finfo2);
 
@@ -223,7 +223,7 @@ static BOOL test_delayed_write_update2(struct smbcli_state *cli, TALLOC_CTX *mem
        /* Now try a write to see if the write time gets reset. */
 
        finfo1.basic_info.level = RAW_FILEINFO_BASIC_INFO;
-       finfo1.basic_info.in.fnum = fnum1;
+       finfo1.basic_info.file.fnum = fnum1;
        finfo2 = finfo1;
 
        status = smb_raw_fileinfo(cli->tree, mem_ctx, &finfo1);
@@ -252,7 +252,7 @@ static BOOL test_delayed_write_update2(struct smbcli_state *cli, TALLOC_CTX *mem
 
        printf("Doing flush after write\n");
 
-       flsh.in.fnum = fnum1;
+       flsh.flush.file.fnum = fnum1;
        status = smb_raw_flush(cli->tree, &flsh);
        if (!NT_STATUS_IS_OK(status)) {
                DEBUG(0, ("smbflush failed: %s\n", nt_errstr(status)));
@@ -330,7 +330,7 @@ static BOOL test_delayed_write_update2(struct smbcli_state *cli, TALLOC_CTX *mem
        }
 
        finfo1.basic_info.level = RAW_FILEINFO_BASIC_INFO;
-       finfo1.basic_info.in.fnum = fnum2;
+       finfo1.basic_info.file.fnum = fnum2;
        finfo2 = finfo1;
        status = smb_raw_fileinfo(cli->tree, mem_ctx, &finfo2);
 
@@ -384,7 +384,7 @@ static BOOL test_delayed_write_update2(struct smbcli_state *cli, TALLOC_CTX *mem
        }
 
        finfo1.basic_info.level = RAW_FILEINFO_BASIC_INFO;
-       finfo1.basic_info.in.fnum = fnum1;
+       finfo1.basic_info.file.fnum = fnum1;
        finfo2 = finfo1;
 
        status = smb_raw_fileinfo(cli->tree, mem_ctx, &finfo1);
@@ -409,7 +409,7 @@ static BOOL test_delayed_write_update2(struct smbcli_state *cli, TALLOC_CTX *mem
        }
 
        finfo1.basic_info.level = RAW_FILEINFO_BASIC_INFO;
-       finfo1.basic_info.in.fnum = fnum1;
+       finfo1.basic_info.file.fnum = fnum1;
        finfo2 = finfo1;
        status = smb_raw_fileinfo(cli->tree, mem_ctx, &finfo2);
 
@@ -502,7 +502,7 @@ static BOOL test_finfo_after_write(struct smbcli_state *cli, TALLOC_CTX *mem_ctx
        }
 
        finfo1.basic_info.level = RAW_FILEINFO_BASIC_INFO;
-       finfo1.basic_info.in.fnum = fnum1;
+       finfo1.basic_info.file.fnum = fnum1;
 
        status = smb_raw_fileinfo(cli->tree, mem_ctx, &finfo1);
 
@@ -545,7 +545,7 @@ static BOOL test_finfo_after_write(struct smbcli_state *cli, TALLOC_CTX *mem_ctx
        }
        
        finfo2.basic_info.level = RAW_FILEINFO_BASIC_INFO;
-       finfo2.basic_info.in.fname = fname;
+       finfo2.basic_info.file.path = fname;
        
        status = smb_raw_pathinfo(cli2->tree, mem_ctx, &finfo2);
        
@@ -598,7 +598,7 @@ static BOOL test_finfo_after_write(struct smbcli_state *cli, TALLOC_CTX *mem_ctx
 
        /* This call is only for the people looking at ethereal :-) */
        finfo2.basic_info.level = RAW_FILEINFO_BASIC_INFO;
-       finfo2.basic_info.in.fname = fname;
+       finfo2.basic_info.file.path = fname;
 
        status = smb_raw_pathinfo(cli->tree, mem_ctx, &finfo2);
 
index 606e85a304cf942c646b7328671bf129931e99ba..6aae6d073becc4aa72dbaa9387e156212da73c04 100644 (file)
@@ -58,7 +58,7 @@ static BOOL check_delete_on_close(struct smbcli_state *cli, int fnum,
                int nlink = expect_it ? 0 : 1;
 
                io.all_info.level = RAW_FILEINFO_ALL_INFO;
-               io.all_info.in.fnum = fnum;
+               io.all_info.file.fnum = fnum;
 
                status = smb_raw_fileinfo(cli->tree, mem_ctx, &io);
                if (!NT_STATUS_IS_OK(status)) {
@@ -83,7 +83,7 @@ static BOOL check_delete_on_close(struct smbcli_state *cli, int fnum,
                }
 
                io.standard_info.level = RAW_FILEINFO_STANDARD_INFO;
-               io.standard_info.in.fnum = fnum;
+               io.standard_info.file.fnum = fnum;
 
                status = smb_raw_fileinfo(cli->tree, mem_ctx, &io);
                if (!NT_STATUS_IS_OK(status)) {
index 2e68efa4eb18865ece643039a1792c53d14144c4..646714a4e9175c11ba33b59483876eb9f83ecdd2 100644 (file)
@@ -1847,20 +1847,20 @@ static BOOL torture_ntdenytest(struct smbcli_state *cli1, struct smbcli_state *c
                } else {
                        res = A_0;
                        if (smbcli_read(cli2->tree, 
-                                       io2.ntcreatex.out.fnum, buf, 0, sizeof(buf)) >= 1) {
+                                       io2.ntcreatex.file.fnum, buf, 0, sizeof(buf)) >= 1) {
                                res += A_R;
                        }
                        if (smbcli_write(cli2->tree, 
-                                        io2.ntcreatex.out.fnum, 0, buf, 0, sizeof(buf)) >= 1) {
+                                        io2.ntcreatex.file.fnum, 0, buf, 0, sizeof(buf)) >= 1) {
                                res += A_W;
                        }
                }
                
                if (NT_STATUS_IS_OK(status1)) {
-                       smbcli_close(cli1->tree, io1.ntcreatex.out.fnum);
+                       smbcli_close(cli1->tree, io1.ntcreatex.file.fnum);
                }
                if (NT_STATUS_IS_OK(status2)) {
-                       smbcli_close(cli2->tree, io2.ntcreatex.out.fnum);
+                       smbcli_close(cli2->tree, io2.ntcreatex.file.fnum);
                }
                
                status2_p = predict_share_conflict(io1.ntcreatex.in.share_access,
@@ -2000,11 +2000,11 @@ BOOL torture_denydos_sharing(void)
        printf("openx twice with RDWR/DENY_DOS\n");
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum1 = io.openx.out.fnum;
+       fnum1 = io.openx.file.fnum;
 
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum2 = io.openx.out.fnum;
+       fnum2 = io.openx.file.fnum;
 
        printf("fnum1=%d fnum2=%d\n", fnum1, fnum2);
 
@@ -2016,12 +2016,12 @@ BOOL torture_denydos_sharing(void)
 
        printf("two handles should be same file handle\n");
        finfo.position_information.level = RAW_FILEINFO_POSITION_INFORMATION;
-       finfo.position_information.in.fnum = fnum1;
+       finfo.position_information.file.fnum = fnum1;
        status = smb_raw_fileinfo(cli->tree, mem_ctx, &finfo);
        CHECK_STATUS(status, NT_STATUS_OK);
        CHECK_VAL(finfo.position_information.out.position, 1000);
 
-       finfo.position_information.in.fnum = fnum2;
+       finfo.position_information.file.fnum = fnum2;
        status = smb_raw_fileinfo(cli->tree, mem_ctx, &finfo);
        CHECK_STATUS(status, NT_STATUS_OK);
        CHECK_VAL(finfo.position_information.out.position, 1000);
@@ -2034,12 +2034,12 @@ BOOL torture_denydos_sharing(void)
        io.openx.in.open_mode = OPENX_MODE_ACCESS_RDWR | OPENX_MODE_DENY_NONE;
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum1 = io.openx.out.fnum;
+       fnum1 = io.openx.file.fnum;
 
        io.openx.in.open_func = OPENX_OPEN_FUNC_OPEN;
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum2 = io.openx.out.fnum;
+       fnum2 = io.openx.file.fnum;
 
        printf("fnum1=%d fnum2=%d\n", fnum1, fnum2);
 
@@ -2051,12 +2051,12 @@ BOOL torture_denydos_sharing(void)
        CHECK_STATUS(status, NT_STATUS_OK);
 
        finfo.position_information.level = RAW_FILEINFO_POSITION_INFORMATION;
-       finfo.position_information.in.fnum = fnum1;
+       finfo.position_information.file.fnum = fnum1;
        status = smb_raw_fileinfo(cli->tree, mem_ctx, &finfo);
        CHECK_STATUS(status, NT_STATUS_OK);
        CHECK_VAL(finfo.position_information.out.position, 1000);
 
-       finfo.position_information.in.fnum = fnum2;
+       finfo.position_information.file.fnum = fnum2;
        status = smb_raw_fileinfo(cli->tree, mem_ctx, &finfo);
        CHECK_STATUS(status, NT_STATUS_OK);
        CHECK_VAL(finfo.position_information.out.position, 0);
index 61b1750b92e4a4e1bffe41d69da2dbe42066e82e..8ad11ccb6cfe000e48346e627cdb3c1c32cf3a70 100644 (file)
@@ -96,7 +96,7 @@ static BOOL test_disconnect_lock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        }
 
        io.lockx.level = RAW_LOCK_LOCKX;
-       io.lockx.in.fnum = fnum;
+       io.lockx.file.fnum = fnum;
        io.lockx.in.mode = 0;
        io.lockx.in.timeout = 0;
        io.lockx.in.lock_cnt = 1;
index 35cae68636ab25ffd15be8483eca3db071eb646f..9a268c57b52e93dda0fc1772d6f6a864ff7470d2 100644 (file)
@@ -85,7 +85,7 @@ static struct {
 static struct {
        int notify_count;
        NTSTATUS status;
-       struct smb_notify notify;
+       union smb_notify notify;
 } notifies[NSERVERS][NINSTANCES];
 
 /* info relevant to the current operation */
@@ -681,7 +681,7 @@ static struct ea_struct gen_ea_struct(void)
 */
 static void async_notify(struct smbcli_request *req)
 {
-       struct smb_notify notify;
+       union smb_notify notify;
        NTSTATUS status;
        int i, j;
        uint16_t tid;
@@ -693,9 +693,9 @@ static void async_notify(struct smbcli_request *req)
        if (NT_STATUS_IS_OK(status)) {
                printf("notify tid=%d num_changes=%d action=%d name=%s\n", 
                       tid, 
-                      notify.out.num_changes,
-                      notify.out.changes[0].action,
-                      notify.out.changes[0].name.s);
+                      notify.notify.out.num_changes,
+                      notify.notify.out.changes[0].action,
+                      notify.notify.out.changes[0].name.s);
        }
 
        for (i=0;i<NSERVERS;i++) {
@@ -762,7 +762,7 @@ static BOOL oplock_handler(struct smbcli_transport *transport, uint16_t tid, uin
        printf("oplock close fnum=%d\n", fnum);
 
        io.close.level = RAW_CLOSE_CLOSE;
-       io.close.in.fnum = fnum;
+       io.close.file.fnum = fnum;
        io.close.in.write_time = 0;
        req = smb_raw_close_send(tree, &io);
 
@@ -893,7 +893,7 @@ again:
        for (j=0;j<NINSTANCES;j++) {
                for (i=1;i<NSERVERS;i++) {
                        int n;
-                       struct smb_notify not1, not2;
+                       union smb_notify not1, not2;
 
                        if (notifies[0][j].notify_count != notifies[i][j].notify_count) {
                                if (tries++ < 10) goto again;
@@ -920,26 +920,26 @@ again:
                        not1 = notifies[0][j].notify;
                        not2 = notifies[i][j].notify;
 
-                       for (n=0;n<not1.out.num_changes;n++) {
-                               if (not1.out.changes[n].action != 
-                                   not2.out.changes[n].action) {
+                       for (n=0;n<not1.notify.out.num_changes;n++) {
+                               if (not1.notify.out.changes[n].action != 
+                                   not2.notify.out.changes[n].action) {
                                        printf("Notify action %d inconsistent %d %d\n", n,
-                                              not1.out.changes[n].action,
-                                              not2.out.changes[n].action);
+                                              not1.notify.out.changes[n].action,
+                                              not2.notify.out.changes[n].action);
                                        return False;
                                }
-                               if (strcmp(not1.out.changes[n].name.s,
-                                          not2.out.changes[n].name.s)) {
+                               if (strcmp(not1.notify.out.changes[n].name.s,
+                                          not2.notify.out.changes[n].name.s)) {
                                        printf("Notify name %d inconsistent %s %s\n", n,
-                                              not1.out.changes[n].name.s,
-                                              not2.out.changes[n].name.s);
+                                              not1.notify.out.changes[n].name.s,
+                                              not2.notify.out.changes[n].name.s);
                                        return False;
                                }
-                               if (not1.out.changes[n].name.private_length !=
-                                   not2.out.changes[n].name.private_length) {
+                               if (not1.notify.out.changes[n].name.private_length !=
+                                   not2.notify.out.changes[n].name.private_length) {
                                        printf("Notify name length %d inconsistent %d %d\n", n,
-                                              not1.out.changes[n].name.private_length,
-                                              not2.out.changes[n].name.private_length);
+                                              not1.notify.out.changes[n].name.private_length,
+                                              not2.notify.out.changes[n].name.private_length);
                                        return False;
                                }
                        }
@@ -1095,7 +1095,7 @@ static BOOL handler_openx(int instance)
        CHECK_TIMES_EQUAL(openx.out.write_time);
 
        /* open creates a new file handle */
-       ADD_HANDLE(parm[0].openx.in.fname, openx.out.fnum);
+       ADD_HANDLE(parm[0].openx.in.fname, openx.file.fnum);
 
        return True;
 }
@@ -1129,7 +1129,7 @@ static BOOL handler_open(int instance)
        CHECK_EQUAL(openold.out.rmode);
 
        /* open creates a new file handle */
-       ADD_HANDLE(parm[0].openold.in.fname, openold.out.fnum);
+       ADD_HANDLE(parm[0].openold.in.fname, openold.file.fnum);
 
        return True;
 }
@@ -1182,7 +1182,7 @@ static BOOL handler_ntcreatex(int instance)
        CHECK_EQUAL(ntcreatex.out.is_directory);
 
        /* ntcreatex creates a new file handle */
-       ADD_HANDLE(parm[0].ntcreatex.in.fname, ntcreatex.out.fnum);
+       ADD_HANDLE(parm[0].ntcreatex.in.fname, ntcreatex.file.fnum);
 
        return True;
 }
@@ -1196,14 +1196,14 @@ static BOOL handler_close(int instance)
        NTSTATUS status[NSERVERS];
 
        parm[0].close.level = RAW_CLOSE_CLOSE;
-       parm[0].close.in.fnum = gen_fnum_close(instance);
+       parm[0].close.file.fnum = gen_fnum_close(instance);
        parm[0].close.in.write_time = gen_timet();
 
        GEN_COPY_PARM;
-       GEN_SET_FNUM(close.in.fnum);
+       GEN_SET_FNUM(close.file.fnum);
        GEN_CALL(smb_raw_close(tree, &parm[i]));
 
-       REMOVE_HANDLE(close.in.fnum);
+       REMOVE_HANDLE(close.file.fnum);
 
        return True;
 }
@@ -1213,11 +1213,11 @@ static BOOL handler_close(int instance)
 */
 static BOOL handler_unlink(int instance)
 {
-       struct smb_unlink parm[NSERVERS];
+       union smb_unlink parm[NSERVERS];
        NTSTATUS status[NSERVERS];
 
-       parm[0].in.pattern = gen_pattern();
-       parm[0].in.attrib = gen_attrib();
+       parm[0].unlink.in.pattern = gen_pattern();
+       parm[0].unlink.in.attrib = gen_attrib();
 
        GEN_COPY_PARM;
        GEN_CALL(smb_raw_unlink(tree, &parm[i]));
@@ -1230,10 +1230,10 @@ static BOOL handler_unlink(int instance)
 */
 static BOOL handler_chkpath(int instance)
 {
-       struct smb_chkpath parm[NSERVERS];
+       union smb_chkpath parm[NSERVERS];
        NTSTATUS status[NSERVERS];
 
-       parm[0].in.path = gen_fname_open(instance);
+       parm[0].chkpath.in.path = gen_fname_open(instance);
 
        GEN_COPY_PARM;
        GEN_CALL(smb_raw_chkpath(tree, &parm[i]));
@@ -1320,18 +1320,18 @@ static BOOL handler_ntrename(int instance)
 */
 static BOOL handler_seek(int instance)
 {
-       struct smb_seek parm[NSERVERS];
+       union smb_seek parm[NSERVERS];
        NTSTATUS status[NSERVERS];
 
-       parm[0].in.fnum = gen_fnum(instance);
-       parm[0].in.mode = gen_bits_mask2(0x3, 0xFFFF);
-       parm[0].in.offset = gen_offset();
+       parm[0].lseek.file.fnum = gen_fnum(instance);
+       parm[0].lseek.in.mode = gen_bits_mask2(0x3, 0xFFFF);
+       parm[0].lseek.in.offset = gen_offset();
 
        GEN_COPY_PARM;
-       GEN_SET_FNUM(in.fnum);
+       GEN_SET_FNUM(lseek.file.fnum);
        GEN_CALL(smb_raw_seek(tree, &parm[i]));
 
-       CHECK_EQUAL(out.offset);
+       CHECK_EQUAL(lseek.out.offset);
 
        return True;
 }
@@ -1346,7 +1346,7 @@ static BOOL handler_readx(int instance)
        NTSTATUS status[NSERVERS];
 
        parm[0].readx.level = RAW_READ_READX;
-       parm[0].readx.in.fnum = gen_fnum(instance);
+       parm[0].readx.file.fnum = gen_fnum(instance);
        parm[0].readx.in.offset = gen_offset();
        parm[0].readx.in.mincnt = gen_io_count();
        parm[0].readx.in.maxcnt = gen_io_count();
@@ -1355,7 +1355,7 @@ static BOOL handler_readx(int instance)
                                             MAX(parm[0].readx.in.mincnt, parm[0].readx.in.maxcnt));
 
        GEN_COPY_PARM;
-       GEN_SET_FNUM(readx.in.fnum);
+       GEN_SET_FNUM(readx.file.fnum);
        GEN_CALL(smb_raw_read(tree, &parm[i]));
 
        CHECK_EQUAL(readx.out.remaining);
@@ -1374,7 +1374,7 @@ static BOOL handler_writex(int instance)
        NTSTATUS status[NSERVERS];
 
        parm[0].writex.level = RAW_WRITE_WRITEX;
-       parm[0].writex.in.fnum = gen_fnum(instance);
+       parm[0].writex.file.fnum = gen_fnum(instance);
        parm[0].writex.in.offset = gen_offset();
        parm[0].writex.in.wmode = gen_bits_mask(0xFFFF);
        parm[0].writex.in.remaining = gen_io_count();
@@ -1382,7 +1382,7 @@ static BOOL handler_writex(int instance)
        parm[0].writex.in.data = talloc_zero_size(current_op.mem_ctx, parm[0].writex.in.count);
 
        GEN_COPY_PARM;
-       GEN_SET_FNUM(writex.in.fnum);
+       GEN_SET_FNUM(writex.file.fnum);
        GEN_CALL(smb_raw_write(tree, &parm[i]));
 
        CHECK_EQUAL(writex.out.nwritten);
@@ -1401,7 +1401,7 @@ static BOOL handler_lockingx(int instance)
        int n, nlocks;
 
        parm[0].lockx.level = RAW_LOCK_LOCKX;
-       parm[0].lockx.in.fnum = gen_fnum(instance);
+       parm[0].lockx.file.fnum = gen_fnum(instance);
        parm[0].lockx.in.mode = gen_lock_mode();
        parm[0].lockx.in.timeout = gen_timeout();
        do {
@@ -1424,7 +1424,7 @@ static BOOL handler_lockingx(int instance)
        }
 
        GEN_COPY_PARM;
-       GEN_SET_FNUM(lockx.in.fnum);
+       GEN_SET_FNUM(lockx.file.fnum);
        GEN_CALL(smb_raw_lock(tree, &parm[i]));
 
        return True;
@@ -1641,7 +1641,7 @@ static BOOL handler_qpathinfo(int instance)
        union smb_fileinfo parm[NSERVERS];
        NTSTATUS status[NSERVERS];
 
-       parm[0].generic.in.fname = gen_fname_open(instance);
+       parm[0].generic.file.path = gen_fname_open(instance);
 
        gen_fileinfo(instance, &parm[0]);
 
@@ -1659,12 +1659,12 @@ static BOOL handler_qfileinfo(int instance)
        union smb_fileinfo parm[NSERVERS];
        NTSTATUS status[NSERVERS];
 
-       parm[0].generic.in.fnum = gen_fnum(instance);
+       parm[0].generic.file.fnum = gen_fnum(instance);
 
        gen_fileinfo(instance, &parm[0]);
 
        GEN_COPY_PARM;
-       GEN_SET_FNUM(generic.in.fnum);
+       GEN_SET_FNUM(generic.file.fnum);
        GEN_CALL(smb_raw_fileinfo(tree, current_op.mem_ctx, &parm[i]));
 
        return cmp_fileinfo(instance, parm, status);
@@ -1777,7 +1777,7 @@ static BOOL handler_spathinfo(int instance)
        union smb_setfileinfo parm[NSERVERS];
        NTSTATUS status[NSERVERS];
 
-       parm[0].generic.file.fname = gen_fname_open(instance);
+       parm[0].generic.file.path = gen_fname_open(instance);
 
        gen_setfileinfo(instance, &parm[0]);
 
@@ -1820,16 +1820,16 @@ static BOOL handler_sfileinfo(int instance)
 */
 static BOOL handler_notify(int instance)
 {
-       struct smb_notify parm[NSERVERS];
+       union smb_notify parm[NSERVERS];
        int n;
 
-       parm[0].in.buffer_size = gen_io_count();
-       parm[0].in.completion_filter = gen_bits_mask(0xFF);
-       parm[0].in.fnum = gen_fnum(instance);
-       parm[0].in.recursive = gen_bool();
+       parm[0].notify.in.buffer_size = gen_io_count();
+       parm[0].notify.in.completion_filter = gen_bits_mask(0xFF);
+       parm[0].notify.file.fnum = gen_fnum(instance);
+       parm[0].notify.in.recursive = gen_bool();
 
        GEN_COPY_PARM;
-       GEN_SET_FNUM(in.fnum);
+       GEN_SET_FNUM(notify.file.fnum);
 
        for (n=0;n<NSERVERS;n++) {
                struct smbcli_request *req;
index 863ddae83f577d31ae704c584d5f64377d831631..c5cebdc8d26f3065ac479bc6e80ed0b163d42e7c 100644 (file)
@@ -221,14 +221,14 @@ static void check_status(const char *op, NTSTATUS status, NTSTATUS ret)
 
 void nb_unlink(const char *fname, int attr, NTSTATUS status)
 {
-       struct smb_unlink io;
+       union smb_unlink io;
        NTSTATUS ret;
 
-       io.in.pattern = fname;
+       io.unlink.in.pattern = fname;
 
-       io.in.attrib = FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN;
+       io.unlink.in.attrib = FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN;
        if (strchr(fname, '*') == 0) {
-               io.in.attrib |= FILE_ATTRIBUTE_DIRECTORY;
+               io.unlink.in.attrib |= FILE_ATTRIBUTE_DIRECTORY;
        }
 
        ret = smb_raw_unlink(c->tree, &io);
@@ -286,7 +286,7 @@ void nb_createx(const char *fname,
 
        f = malloc_p(struct ftable);
        f->handle = handle;
-       f->fd = io.ntcreatex.out.fnum;
+       f->fd = io.ntcreatex.file.fnum;
 
        DLIST_ADD_END(ftable, f, struct ftable *);
 }
@@ -306,7 +306,7 @@ void nb_writex(int handle, int offset, int size, int ret_size, NTSTATUS status)
        memset(buf, 0xab, size);
 
        io.writex.level = RAW_WRITE_WRITEX;
-       io.writex.in.fnum = i;
+       io.writex.file.fnum = i;
        io.writex.in.wmode = 0;
        io.writex.in.remaining = 0;
        io.writex.in.offset = offset;
@@ -344,7 +344,7 @@ void nb_write(int handle, int offset, int size, int ret_size, NTSTATUS status)
        memset(buf, 0x12, size);
 
        io.write.level = RAW_WRITE_WRITE;
-       io.write.in.fnum = i;
+       io.write.file.fnum = i;
        io.write.in.remaining = 0;
        io.write.in.offset = offset;
        io.write.in.count = size;
@@ -380,7 +380,7 @@ void nb_lockx(int handle, uint_t offset, int size, NTSTATUS status)
        lck.count = size;
 
        io.lockx.level = RAW_LOCK_LOCKX;
-       io.lockx.in.fnum = i;
+       io.lockx.file.fnum = i;
        io.lockx.in.mode = 0;
        io.lockx.in.timeout = 0;
        io.lockx.in.ulock_cnt = 0;
@@ -406,7 +406,7 @@ void nb_unlockx(int handle, uint_t offset, int size, NTSTATUS status)
        lck.count = size;
 
        io.lockx.level = RAW_LOCK_LOCKX;
-       io.lockx.in.fnum = i;
+       io.lockx.file.fnum = i;
        io.lockx.in.mode = 0;
        io.lockx.in.timeout = 0;
        io.lockx.in.ulock_cnt = 1;
@@ -432,7 +432,7 @@ void nb_readx(int handle, int offset, int size, int ret_size, NTSTATUS status)
        buf = malloc(size);
 
        io.readx.level = RAW_READ_READX;
-       io.readx.in.fnum = i;
+       io.readx.file.fnum = i;
        io.readx.in.offset    = offset;
        io.readx.in.mincnt    = size;
        io.readx.in.maxcnt    = size;
@@ -464,7 +464,7 @@ void nb_close(int handle, NTSTATUS status)
        i = find_handle(handle);
 
        io.close.level = RAW_CLOSE_CLOSE;
-       io.close.in.fnum = i;
+       io.close.file.fnum = i;
        io.close.in.write_time = 0;
 
        ret = smb_raw_close(c->tree, &io);
@@ -526,7 +526,7 @@ void nb_qpathinfo(const char *fname, int level, NTSTATUS status)
        mem_ctx = talloc_init("nb_qpathinfo");
 
        io.generic.level = level;
-       io.generic.in.fname = fname;
+       io.generic.file.path = fname;
 
        ret = smb_raw_pathinfo(c->tree, mem_ctx, &io);
 
@@ -548,7 +548,7 @@ void nb_qfileinfo(int fnum, int level, NTSTATUS status)
        mem_ctx = talloc_init("nb_qfileinfo");
 
        io.generic.level = level;
-       io.generic.in.fnum = i;
+       io.generic.file.fnum = i;
 
        ret = smb_raw_fileinfo(c->tree, mem_ctx, &io);
 
@@ -637,12 +637,12 @@ void nb_findfirst(const char *mask, int level, int maxcnt, int count, NTSTATUS s
 
 void nb_flush(int fnum, NTSTATUS status)
 {
-       struct smb_flush io;
+       union smb_flush io;
        NTSTATUS ret;
        int i;
        i = find_handle(fnum);
 
-       io.in.fnum = i;
+       io.flush.file.fnum = i;
 
        ret = smb_raw_flush(c->tree, &io);
 
index 5abe9f23c41031c974572f132174a9c4bcb078d9..74aefa4af509a7af7b6c9d7c01216dd81ad17b7a 100644 (file)
@@ -69,11 +69,11 @@ static BOOL test_sd(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        io.ntcreatex.in.fname = fname;
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum = io.ntcreatex.out.fnum;
+       fnum = io.ntcreatex.file.fnum;
        
        q.query_secdesc.level = RAW_FILEINFO_SEC_DESC;
-       q.query_secdesc.in.fnum = fnum;
-       q.query_secdesc.secinfo_flags = 
+       q.query_secdesc.file.fnum = fnum;
+       q.query_secdesc.in.secinfo_flags = 
                SECINFO_OWNER |
                SECINFO_GROUP |
                SECINFO_DACL;
@@ -95,7 +95,7 @@ static BOOL test_sd(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
 
        set.set_secdesc.level = RAW_SFILEINFO_SEC_DESC;
        set.set_secdesc.file.fnum = fnum;
-       set.set_secdesc.in.secinfo_flags = q.query_secdesc.secinfo_flags;
+       set.set_secdesc.in.secinfo_flags = q.query_secdesc.in.secinfo_flags;
        set.set_secdesc.in.sd = sd;
 
        status = smb_raw_setfileinfo(cli->tree, &set);
@@ -177,13 +177,13 @@ static BOOL test_nttrans_create(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
 
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum = io.ntcreatex.out.fnum;
+       fnum = io.ntcreatex.file.fnum;
 
        printf("querying ACL\n");
 
        q.query_secdesc.level = RAW_FILEINFO_SEC_DESC;
-       q.query_secdesc.in.fnum = fnum;
-       q.query_secdesc.secinfo_flags = 
+       q.query_secdesc.file.fnum = fnum;
+       q.query_secdesc.in.secinfo_flags = 
                SECINFO_OWNER |
                SECINFO_GROUP |
                SECINFO_DACL;
@@ -210,9 +210,9 @@ static BOOL test_nttrans_create(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        io.ntcreatex.in.sec_desc = sd;
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum = io.ntcreatex.out.fnum;
+       fnum = io.ntcreatex.file.fnum;
        
-       q.query_secdesc.in.fnum = fnum;
+       q.query_secdesc.file.fnum = fnum;
        status = smb_raw_fileinfo(cli->tree, mem_ctx, &q);
        CHECK_STATUS(status, NT_STATUS_OK);
 
@@ -233,7 +233,7 @@ done:
 #define CHECK_ACCESS_FLAGS(_fnum, flags) do { \
        union smb_fileinfo _q; \
        _q.access_information.level = RAW_FILEINFO_ACCESS_INFORMATION; \
-       _q.access_information.in.fnum = (_fnum); \
+       _q.access_information.file.fnum = (_fnum); \
        status = smb_raw_fileinfo(cli->tree, mem_ctx, &_q); \
        CHECK_STATUS(status, NT_STATUS_OK); \
        if (_q.access_information.out.access_flags != (flags)) { \
@@ -279,12 +279,12 @@ static BOOL test_creator_sid(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        io.ntcreatex.in.fname = fname;
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum = io.ntcreatex.out.fnum;
+       fnum = io.ntcreatex.file.fnum;
 
        printf("get the original sd\n");
        q.query_secdesc.level = RAW_FILEINFO_SEC_DESC;
-       q.query_secdesc.in.fnum = fnum;
-       q.query_secdesc.secinfo_flags = SECINFO_DACL | SECINFO_OWNER;
+       q.query_secdesc.file.fnum = fnum;
+       q.query_secdesc.in.secinfo_flags = SECINFO_DACL | SECINFO_OWNER;
        status = smb_raw_fileinfo(cli->tree, mem_ctx, &q);
        CHECK_STATUS(status, NT_STATUS_OK);
        sd_orig = q.query_secdesc.out.sd;
@@ -365,10 +365,10 @@ static BOOL test_creator_sid(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        io.ntcreatex.in.access_mask = SEC_FILE_READ_DATA;
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       CHECK_ACCESS_FLAGS(io.ntcreatex.out.fnum, 
+       CHECK_ACCESS_FLAGS(io.ntcreatex.file.fnum, 
                           SEC_FILE_READ_DATA|
                           SEC_FILE_READ_ATTRIBUTE);
-       smbcli_close(cli->tree, io.ntcreatex.out.fnum);
+       smbcli_close(cli->tree, io.ntcreatex.file.fnum);
 
        printf("try open for generic write\n");
        io.ntcreatex.in.access_mask = SEC_GENERIC_WRITE;
@@ -379,9 +379,9 @@ static BOOL test_creator_sid(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        io.ntcreatex.in.access_mask = SEC_GENERIC_READ;
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       CHECK_ACCESS_FLAGS(io.ntcreatex.out.fnum, 
+       CHECK_ACCESS_FLAGS(io.ntcreatex.file.fnum, 
                           SEC_RIGHTS_FILE_READ);
-       smbcli_close(cli->tree, io.ntcreatex.out.fnum);
+       smbcli_close(cli->tree, io.ntcreatex.file.fnum);
 
        printf("set a sec desc allowing generic read by owner\n");
        sd = security_descriptor_create(mem_ctx,
@@ -426,10 +426,10 @@ static BOOL test_creator_sid(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        io.ntcreatex.in.access_mask = SEC_FILE_READ_DATA;
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       CHECK_ACCESS_FLAGS(io.ntcreatex.out.fnum, 
+       CHECK_ACCESS_FLAGS(io.ntcreatex.file.fnum, 
                           SEC_FILE_READ_DATA | 
                           SEC_FILE_READ_ATTRIBUTE);
-       smbcli_close(cli->tree, io.ntcreatex.out.fnum);
+       smbcli_close(cli->tree, io.ntcreatex.file.fnum);
 
        printf("try open for generic write\n");
        io.ntcreatex.in.access_mask = SEC_GENERIC_WRITE;
@@ -440,8 +440,8 @@ static BOOL test_creator_sid(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        io.ntcreatex.in.access_mask = SEC_GENERIC_READ;
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       CHECK_ACCESS_FLAGS(io.ntcreatex.out.fnum, SEC_RIGHTS_FILE_READ);
-       smbcli_close(cli->tree, io.ntcreatex.out.fnum);
+       CHECK_ACCESS_FLAGS(io.ntcreatex.file.fnum, SEC_RIGHTS_FILE_READ);
+       smbcli_close(cli->tree, io.ntcreatex.file.fnum);
 
 
        printf("put back original sd\n");
@@ -517,12 +517,12 @@ static BOOL test_generic_bits(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        io.ntcreatex.in.fname = fname;
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum = io.ntcreatex.out.fnum;
+       fnum = io.ntcreatex.file.fnum;
 
        printf("get the original sd\n");
        q.query_secdesc.level = RAW_FILEINFO_SEC_DESC;
-       q.query_secdesc.in.fnum = fnum;
-       q.query_secdesc.secinfo_flags = SECINFO_DACL | SECINFO_OWNER;
+       q.query_secdesc.file.fnum = fnum;
+       q.query_secdesc.in.secinfo_flags = SECINFO_DACL | SECINFO_OWNER;
        status = smb_raw_fileinfo(cli->tree, mem_ctx, &q);
        CHECK_STATUS(status, NT_STATUS_OK);
        sd_orig = q.query_secdesc.out.sd;
@@ -599,9 +599,9 @@ static BOOL test_generic_bits(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
                io.ntcreatex.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
                status = smb_raw_open(cli->tree, mem_ctx, &io);
                CHECK_STATUS(status, NT_STATUS_OK);
-               CHECK_ACCESS_FLAGS(io.ntcreatex.out.fnum, 
+               CHECK_ACCESS_FLAGS(io.ntcreatex.file.fnum, 
                                   expected_mask | file_mappings[i].specific_bits);
-               smbcli_close(cli->tree, io.ntcreatex.out.fnum);
+               smbcli_close(cli->tree, io.ntcreatex.file.fnum);
 
                if (!has_take_ownership_privilege) {
                        continue;
@@ -647,9 +647,9 @@ static BOOL test_generic_bits(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
                io.ntcreatex.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
                status = smb_raw_open(cli->tree, mem_ctx, &io);
                CHECK_STATUS(status, NT_STATUS_OK);
-               CHECK_ACCESS_FLAGS(io.ntcreatex.out.fnum, 
+               CHECK_ACCESS_FLAGS(io.ntcreatex.file.fnum, 
                                   expected_mask_anon | file_mappings[i].specific_bits);
-               smbcli_close(cli->tree, io.ntcreatex.out.fnum);
+               smbcli_close(cli->tree, io.ntcreatex.file.fnum);
        }
 
        printf("put back original sd\n");
@@ -679,12 +679,12 @@ static BOOL test_generic_bits(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        io.ntcreatex.in.fname = fname;
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum = io.ntcreatex.out.fnum;
+       fnum = io.ntcreatex.file.fnum;
 
        printf("get the original sd\n");
        q.query_secdesc.level = RAW_FILEINFO_SEC_DESC;
-       q.query_secdesc.in.fnum = fnum;
-       q.query_secdesc.secinfo_flags = SECINFO_DACL | SECINFO_OWNER;
+       q.query_secdesc.file.fnum = fnum;
+       q.query_secdesc.in.secinfo_flags = SECINFO_DACL | SECINFO_OWNER;
        status = smb_raw_fileinfo(cli->tree, mem_ctx, &q);
        CHECK_STATUS(status, NT_STATUS_OK);
        sd_orig = q.query_secdesc.out.sd;
@@ -739,9 +739,9 @@ static BOOL test_generic_bits(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
                io.ntcreatex.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
                status = smb_raw_open(cli->tree, mem_ctx, &io);
                CHECK_STATUS(status, NT_STATUS_OK);
-               CHECK_ACCESS_FLAGS(io.ntcreatex.out.fnum, 
+               CHECK_ACCESS_FLAGS(io.ntcreatex.file.fnum, 
                                   expected_mask | dir_mappings[i].specific_bits);
-               smbcli_close(cli->tree, io.ntcreatex.out.fnum);
+               smbcli_close(cli->tree, io.ntcreatex.file.fnum);
        }
 
        printf("put back original sd\n");
@@ -797,12 +797,12 @@ static BOOL test_owner_bits(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        io.ntcreatex.in.fname = fname;
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum = io.ntcreatex.out.fnum;
+       fnum = io.ntcreatex.file.fnum;
 
        printf("get the original sd\n");
        q.query_secdesc.level = RAW_FILEINFO_SEC_DESC;
-       q.query_secdesc.in.fnum = fnum;
-       q.query_secdesc.secinfo_flags = SECINFO_DACL | SECINFO_OWNER;
+       q.query_secdesc.file.fnum = fnum;
+       q.query_secdesc.in.secinfo_flags = SECINFO_DACL | SECINFO_OWNER;
        status = smb_raw_fileinfo(cli->tree, mem_ctx, &q);
        CHECK_STATUS(status, NT_STATUS_OK);
        sd_orig = q.query_secdesc.out.sd;
@@ -855,8 +855,8 @@ static BOOL test_owner_bits(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
                                       bit, expected_bits);
                        }
                        CHECK_STATUS(status, NT_STATUS_OK);
-                       CHECK_ACCESS_FLAGS(io.ntcreatex.out.fnum, bit | SEC_FILE_READ_ATTRIBUTE);
-                       smbcli_close(cli->tree, io.ntcreatex.out.fnum);
+                       CHECK_ACCESS_FLAGS(io.ntcreatex.file.fnum, bit | SEC_FILE_READ_ATTRIBUTE);
+                       smbcli_close(cli->tree, io.ntcreatex.file.fnum);
                } else {
                        CHECK_STATUS(status, NT_STATUS_ACCESS_DENIED);
                }
@@ -1019,12 +1019,12 @@ static BOOL test_inheritance(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
 
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum = io.ntcreatex.out.fnum;
+       fnum = io.ntcreatex.file.fnum;
 
        printf("get the original sd\n");
        q.query_secdesc.level = RAW_FILEINFO_SEC_DESC;
-       q.query_secdesc.in.fnum = fnum;
-       q.query_secdesc.secinfo_flags = SECINFO_DACL | SECINFO_OWNER;
+       q.query_secdesc.file.fnum = fnum;
+       q.query_secdesc.in.secinfo_flags = SECINFO_DACL | SECINFO_OWNER;
        status = smb_raw_fileinfo(cli->tree, mem_ctx, &q);
        CHECK_STATUS(status, NT_STATUS_OK);
        sd_orig = q.query_secdesc.out.sd;
@@ -1070,9 +1070,9 @@ static BOOL test_inheritance(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
                io.ntcreatex.in.create_options = 0;
                status = smb_raw_open(cli->tree, mem_ctx, &io);
                CHECK_STATUS(status, NT_STATUS_OK);
-               fnum2 = io.ntcreatex.out.fnum;
+               fnum2 = io.ntcreatex.file.fnum;
 
-               q.query_secdesc.in.fnum = fnum2;
+               q.query_secdesc.file.fnum = fnum2;
                status = smb_raw_fileinfo(cli->tree, mem_ctx, &q);
                CHECK_STATUS(status, NT_STATUS_OK);
 
@@ -1113,9 +1113,9 @@ static BOOL test_inheritance(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
                io.ntcreatex.in.create_options = NTCREATEX_OPTIONS_DIRECTORY;
                status = smb_raw_open(cli->tree, mem_ctx, &io);
                CHECK_STATUS(status, NT_STATUS_OK);
-               fnum2 = io.ntcreatex.out.fnum;
+               fnum2 = io.ntcreatex.file.fnum;
 
-               q.query_secdesc.in.fnum = fnum2;
+               q.query_secdesc.file.fnum = fnum2;
                status = smb_raw_fileinfo(cli->tree, mem_ctx, &q);
                CHECK_STATUS(status, NT_STATUS_OK);
 
@@ -1205,11 +1205,11 @@ static BOOL test_inheritance(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        io.ntcreatex.in.open_disposition = NTCREATEX_DISP_CREATE;
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum2 = io.ntcreatex.out.fnum;
+       fnum2 = io.ntcreatex.file.fnum;
        CHECK_ACCESS_FLAGS(fnum2, SEC_RIGHTS_FILE_ALL);
 
-       q.query_secdesc.in.fnum = fnum2;
-       q.query_secdesc.secinfo_flags = SECINFO_DACL | SECINFO_OWNER;
+       q.query_secdesc.file.fnum = fnum2;
+       q.query_secdesc.in.secinfo_flags = SECINFO_DACL | SECINFO_OWNER;
        status = smb_raw_fileinfo(cli->tree, mem_ctx, &q);
        CHECK_STATUS(status, NT_STATUS_OK);
        smbcli_close(cli->tree, fnum2);
@@ -1220,7 +1220,7 @@ static BOOL test_inheritance(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        if (NT_STATUS_IS_OK(status)) {
                printf("failed: w2k3 ACL bug (allowed open when ACL should deny)\n");
                ret = False;
-               fnum2 = io.ntcreatex.out.fnum;
+               fnum2 = io.ntcreatex.file.fnum;
                smbcli_close(cli->tree, fnum2);
        } else {
                CHECK_STATUS(status, NT_STATUS_ACCESS_DENIED);
@@ -1241,7 +1241,7 @@ static BOOL test_inheritance(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        io.ntcreatex.in.access_mask = SEC_FILE_WRITE_DATA;
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum2 = io.ntcreatex.out.fnum;
+       fnum2 = io.ntcreatex.file.fnum;
        CHECK_ACCESS_FLAGS(fnum2, SEC_FILE_WRITE_DATA | SEC_FILE_READ_ATTRIBUTE);
        smbcli_close(cli->tree, fnum2);
 
@@ -1262,7 +1262,7 @@ static BOOL test_inheritance(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        io.ntcreatex.in.access_mask = SEC_FILE_WRITE_DATA;
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum2 = io.ntcreatex.out.fnum;
+       fnum2 = io.ntcreatex.file.fnum;
        CHECK_ACCESS_FLAGS(fnum2, SEC_FILE_WRITE_DATA | SEC_FILE_READ_ATTRIBUTE);
        smbcli_close(cli->tree, fnum2);
 
@@ -1318,12 +1318,12 @@ static BOOL test_inheritance_dynamic(struct smbcli_state *cli, TALLOC_CTX *mem_c
 
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum = io.ntcreatex.out.fnum;
+       fnum = io.ntcreatex.file.fnum;
 
        printf("get the original sd\n");
        q.query_secdesc.level = RAW_FILEINFO_SEC_DESC;
-       q.query_secdesc.in.fnum = fnum;
-       q.query_secdesc.secinfo_flags = SECINFO_DACL | SECINFO_OWNER;
+       q.query_secdesc.file.fnum = fnum;
+       q.query_secdesc.in.secinfo_flags = SECINFO_DACL | SECINFO_OWNER;
        status = smb_raw_fileinfo(cli->tree, mem_ctx, &q);
        CHECK_STATUS(status, NT_STATUS_OK);
        sd_orig = q.query_secdesc.out.sd;
@@ -1355,7 +1355,7 @@ static BOOL test_inheritance_dynamic(struct smbcli_state *cli, TALLOC_CTX *mem_c
        io.ntcreatex.in.open_disposition = NTCREATEX_DISP_CREATE;
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum2 = io.ntcreatex.out.fnum;
+       fnum2 = io.ntcreatex.file.fnum;
        smbcli_close(cli->tree, fnum2);
 
        printf("try and access file with base rights - should be OK\n");
@@ -1363,7 +1363,7 @@ static BOOL test_inheritance_dynamic(struct smbcli_state *cli, TALLOC_CTX *mem_c
        io.ntcreatex.in.open_disposition = NTCREATEX_DISP_OPEN;
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum2 = io.ntcreatex.out.fnum;
+       fnum2 = io.ntcreatex.file.fnum;
        smbcli_close(cli->tree, fnum2);
 
        printf("try and access file with extra rights - should be denied\n");
@@ -1389,7 +1389,7 @@ static BOOL test_inheritance_dynamic(struct smbcli_state *cli, TALLOC_CTX *mem_c
        io.ntcreatex.in.access_mask = SEC_FILE_WRITE_DATA;
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum2 = io.ntcreatex.out.fnum;
+       fnum2 = io.ntcreatex.file.fnum;
        smbcli_close(cli->tree, fnum2);
 
 
index 4b19372b1054ce29424b74e9b1bbc7469ea89588..7ce5422cfe9963ea95a5d169a02360ac5a176922 100644 (file)
@@ -55,9 +55,9 @@ static NTSTATUS single_search(struct smbcli_state *cli,
 
 static BOOL test_path(struct smbcli_state *cli, const char *path, NTSTATUS expected, NTSTATUS dos_expected)
 {
-       struct smb_chkpath io;
+       union smb_chkpath io;
        NTSTATUS status;
-       io.in.path = path;
+       io.chkpath.in.path = path;
        status = smb_raw_chkpath(cli->tree, &io);
        if (!NT_STATUS_EQUAL(status, expected) && !NT_STATUS_EQUAL(status, dos_expected)) {
                printf("%-40s FAILED %s should be %s or %s\n", 
@@ -72,13 +72,13 @@ static BOOL test_path(struct smbcli_state *cli, const char *path, NTSTATUS expec
 
 static BOOL test_chkpath(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
 {
-       struct smb_chkpath io;
+       union smb_chkpath io;
        NTSTATUS status;
        BOOL ret = True;
        int fnum = -1;
        int fnum1 = -1;
 
-       io.in.path = BASEDIR;
+       io.chkpath.in.path = BASEDIR;
 
        status = smb_raw_chkpath(cli->tree, &io);
        CHECK_STATUS(status, NT_STATUS_OK, NT_STATUS_OK);
index e19fe0f3cb460980d627f175fdd3a46c52ce31b8..8a82a46acc3a08440c133ad8de5e3d3cb0d2e714 100644 (file)
@@ -33,7 +33,7 @@ BOOL torture_raw_close(void)
        BOOL ret = True;
        TALLOC_CTX *mem_ctx;
        union smb_close io;
-       struct smb_flush io_flush;
+       union smb_flush io_flush;
        int fnum;
        const char *fname = "\\torture_close.txt";
        time_t basetime = (time(NULL) + 3*86400) & ~1;
@@ -65,7 +65,7 @@ BOOL torture_raw_close(void)
        REOPEN;
 
        io.close.level = RAW_CLOSE_CLOSE;
-       io.close.in.fnum = fnum;
+       io.close.file.fnum = fnum;
        io.close.in.write_time = basetime;
        status = smb_raw_close(cli->tree, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
@@ -76,8 +76,8 @@ BOOL torture_raw_close(void)
        printf("testing close.in.write_time\n");
 
        /* the file should have the write time set */
-       finfo.generic.in.fname = fname;
        finfo.generic.level = RAW_FILEINFO_ALL_INFO;
+       finfo.generic.file.path = fname;
        status = smb_raw_pathinfo(cli->tree, mem_ctx, &finfo);
        CHECK_STATUS(status, NT_STATUS_OK);
 
@@ -107,20 +107,20 @@ BOOL torture_raw_close(void)
        smbcli_unlink(cli->tree, fname);
        REOPEN;
 
-       finfo2.generic.in.fname = fname;
        finfo2.generic.level = RAW_FILEINFO_ALL_INFO;
+       finfo2.generic.file.path = fname;
        status = smb_raw_pathinfo(cli->tree, mem_ctx, &finfo2);
        CHECK_STATUS(status, NT_STATUS_OK);
 
        io.close.level = RAW_CLOSE_CLOSE;
-       io.close.in.fnum = fnum;
+       io.close.file.fnum = fnum;
        io.close.in.write_time = 0;
        status = smb_raw_close(cli->tree, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
 
        /* the file should have the write time set equal to access time */
-       finfo.generic.in.fname = fname;
        finfo.generic.level = RAW_FILEINFO_ALL_INFO;
+       finfo.generic.file.path = fname;
        status = smb_raw_pathinfo(cli->tree, mem_ctx, &finfo);
        CHECK_STATUS(status, NT_STATUS_OK);
 
@@ -136,31 +136,31 @@ BOOL torture_raw_close(void)
        /* check splclose on a file */
        REOPEN;
        io.splclose.level = RAW_CLOSE_SPLCLOSE;
-       io.splclose.in.fnum = fnum;
+       io.splclose.file.fnum = fnum;
        status = smb_raw_close(cli->tree, &io);
        CHECK_STATUS(status, NT_STATUS_DOS(ERRSRV, ERRerror));
 
        printf("testing flush\n");
        smbcli_close(cli->tree, fnum);
 
-       io_flush.in.fnum = fnum;
+       io_flush.flush.file.fnum = fnum;
        status = smb_raw_flush(cli->tree, &io_flush);
        CHECK_STATUS(status, NT_STATUS_INVALID_HANDLE);
 
-       io_flush.in.fnum = 0xffff;
+       io_flush.flush.file.fnum = 0xffff;
        status = smb_raw_flush(cli->tree, &io_flush);
        CHECK_STATUS(status, NT_STATUS_OK);
 
        REOPEN;
 
-       io_flush.in.fnum = fnum;
+       io_flush.flush.file.fnum = fnum;
        status = smb_raw_flush(cli->tree, &io_flush);
        CHECK_STATUS(status, NT_STATUS_OK);
 
        printf("Testing SMBexit\n");
        smb_raw_exit(cli->session);
 
-       io_flush.in.fnum = fnum;
+       io_flush.flush.file.fnum = fnum;
        status = smb_raw_flush(cli->tree, &io_flush);
        CHECK_STATUS(status, NT_STATUS_INVALID_HANDLE);
        
index 43e059e23d7541f16d8f9df1ba2a787ef20fcd70..ebd3a3857fa0685307b815e12e4e2e210b4d91a8 100644 (file)
@@ -179,11 +179,11 @@ static BOOL test_session(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        io.ntcreatex.in.fname = fname;
        status = smb_raw_open(tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum = io.ntcreatex.out.fnum;
+       fnum = io.ntcreatex.file.fnum;
 
        printf("write using the old vuid\n");
        wr.generic.level = RAW_WRITE_WRITEX;
-       wr.writex.in.fnum = fnum;
+       wr.writex.file.fnum = fnum;
        wr.writex.in.offset = 0;
        wr.writex.in.wmode = 0;
        wr.writex.in.remaining = 0;
@@ -213,7 +213,7 @@ static BOOL test_session(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
 
        printf("the fnum should have been auto-closed\n");
        cl.close.level = RAW_CLOSE_CLOSE;
-       cl.close.in.fnum = fnum;
+       cl.close.file.fnum = fnum;
        cl.close.in.write_time = 0;
        status = smb_raw_close(cli->tree, &cl);
        CHECK_STATUS(status, NT_STATUS_INVALID_HANDLE);
@@ -319,11 +319,11 @@ static BOOL test_tree(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        io.ntcreatex.in.fname = fname;
        status = smb_raw_open(tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum = io.ntcreatex.out.fnum;
+       fnum = io.ntcreatex.file.fnum;
 
        printf("write using the old tid\n");
        wr.generic.level = RAW_WRITE_WRITEX;
-       wr.writex.in.fnum = fnum;
+       wr.writex.file.fnum = fnum;
        wr.writex.in.offset = 0;
        wr.writex.in.wmode = 0;
        wr.writex.in.remaining = 0;
@@ -348,7 +348,7 @@ static BOOL test_tree(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
 
        printf("the fnum should have been auto-closed\n");
        cl.close.level = RAW_CLOSE_CLOSE;
-       cl.close.in.fnum = fnum;
+       cl.close.file.fnum = fnum;
        cl.close.in.write_time = 0;
        status = smb_raw_close(cli->tree, &cl);
        CHECK_STATUS(status, NT_STATUS_INVALID_HANDLE);
@@ -404,12 +404,12 @@ static BOOL test_pid(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        io.ntcreatex.in.fname = fname;
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum = io.ntcreatex.out.fnum;
+       fnum = io.ntcreatex.file.fnum;
 
        printf("write using the old pid\n");
        cli->session->pid = pid1;
        wr.generic.level = RAW_WRITE_WRITEX;
-       wr.writex.in.fnum = fnum;
+       wr.writex.file.fnum = fnum;
        wr.writex.in.offset = 0;
        wr.writex.in.wmode = 0;
        wr.writex.in.remaining = 0;
@@ -449,7 +449,7 @@ static BOOL test_pid(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
 
        printf("the fnum should have been auto-closed\n");
        cl.close.level = RAW_CLOSE_CLOSE;
-       cl.close.in.fnum = fnum;
+       cl.close.file.fnum = fnum;
        cl.close.in.write_time = 0;
        status = smb_raw_close(cli->tree, &cl);
        CHECK_STATUS(status, NT_STATUS_INVALID_HANDLE);
index 3bc954d5729e90bc1e5e5153cf9a98bdc4c2d265..8ef489a7362307e5715f3f247438627e87b56059 100644 (file)
@@ -72,7 +72,7 @@ static BOOL test_eas(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        io.ntcreatex.in.fname = fname;
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum = io.ntcreatex.out.fnum;
+       fnum = io.ntcreatex.file.fnum;
        
        ret &= check_ea(cli, fname, "EAONE", NULL);
 
@@ -297,7 +297,7 @@ static BOOL test_max_eas(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        io.ntcreatex.in.fname = fname;
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum = io.ntcreatex.out.fnum;
+       fnum = io.ntcreatex.file.fnum;
        
        eablob = data_blob_talloc(mem_ctx, NULL, maxeasize);
        if (eablob.data == NULL) {
@@ -409,7 +409,7 @@ static BOOL test_nttrans_create(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
 
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum = io.ntcreatex.out.fnum;
+       fnum = io.ntcreatex.file.fnum;
        
        ret &= check_ea(cli, fname, "EAONE", NULL);
        ret &= check_ea(cli, fname, "1st EA", "Value One");
@@ -429,7 +429,7 @@ static BOOL test_nttrans_create(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
 
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum = io.ntcreatex.out.fnum;
+       fnum = io.ntcreatex.file.fnum;
        
        ret &= check_ea(cli, fname, "1st EA", "Value One");
        ret &= check_ea(cli, fname, "2nd EA", "Second Value");
index 2c51e4d7b41a63c3d9b2e85e808071bdb92fee08..c0df9b77f0587e1d6494027cc0fa2178d1f6b526 100644 (file)
@@ -56,7 +56,7 @@ static BOOL test_ioctl(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
 
        printf("Trying 0xFFFF\n");
        ctl.ioctl.level = RAW_IOCTL_IOCTL;
-       ctl.ioctl.in.fnum = fnum;
+       ctl.ioctl.file.fnum = fnum;
        ctl.ioctl.in.request = 0xFFFF;
 
        status = smb_raw_ioctl(cli->tree, mem_ctx, &ctl);
@@ -64,14 +64,14 @@ static BOOL test_ioctl(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
 
        printf("Trying QUERY_JOB_INFO\n");
        ctl.ioctl.level = RAW_IOCTL_IOCTL;
-       ctl.ioctl.in.fnum = fnum;
+       ctl.ioctl.file.fnum = fnum;
        ctl.ioctl.in.request = IOCTL_QUERY_JOB_INFO;
 
        status = smb_raw_ioctl(cli->tree, mem_ctx, &ctl);
        CHECK_STATUS(status, NT_STATUS_DOS(ERRSRV, ERRerror));
 
        printf("Trying bad handle\n");
-       ctl.ioctl.in.fnum = fnum+1;
+       ctl.ioctl.file.fnum = fnum+1;
        status = smb_raw_ioctl(cli->tree, mem_ctx, &ctl);
        CHECK_STATUS(status, NT_STATUS_DOS(ERRSRV, ERRerror));
 
@@ -101,7 +101,7 @@ static BOOL test_fsctl(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        printf("trying sparse file\n");
        nt.ioctl.level = RAW_IOCTL_NTIOCTL;
        nt.ntioctl.in.function = FSCTL_SET_SPARSE;
-       nt.ntioctl.in.fnum = fnum;
+       nt.ntioctl.file.fnum = fnum;
        nt.ntioctl.in.fsctl = True;
        nt.ntioctl.in.filter = 0;
 
@@ -111,7 +111,7 @@ static BOOL test_fsctl(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        printf("trying batch oplock\n");
        nt.ioctl.level = RAW_IOCTL_NTIOCTL;
        nt.ntioctl.in.function = (FSCTL_FILESYSTEM | (2<<2));
-       nt.ntioctl.in.fnum = fnum;
+       nt.ntioctl.file.fnum = fnum;
        nt.ntioctl.in.fsctl = True;
        nt.ntioctl.in.filter = 0;
 
@@ -123,12 +123,12 @@ static BOOL test_fsctl(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        }
 
        printf("Trying bad handle\n");
-       nt.ntioctl.in.fnum = fnum+1;
+       nt.ntioctl.file.fnum = fnum+1;
        status = smb_raw_ioctl(cli->tree, mem_ctx, &nt);
        CHECK_STATUS(status, NT_STATUS_INVALID_HANDLE);
 
 #if 0
-       nt.ntioctl.in.fnum = fnum;
+       nt.ntioctl.file.fnum = fnum;
        for (i=0;i<100;i++) {
                nt.ntioctl.in.function = FSCTL_FILESYSTEM + (i<<2);
                status = smb_raw_ioctl(cli->tree, mem_ctx, &nt);
index f18df4752816e28fd5458398ccc074402b750bae..bccb17d714b003505bbb351124fb672314452209 100644 (file)
@@ -71,7 +71,7 @@ static BOOL test_lock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
 
        printf("Trying 0/0 lock\n");
        io.lock.level = RAW_LOCK_LOCK;
-       io.lock.in.fnum = fnum;
+       io.lock.file.fnum = fnum;
        io.lock.in.count = 0;
        io.lock.in.offset = 0;
        status = smb_raw_lock(cli->tree, &io);
@@ -86,7 +86,7 @@ static BOOL test_lock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
 
        printf("Trying 0/1 lock\n");
        io.lock.level = RAW_LOCK_LOCK;
-       io.lock.in.fnum = fnum;
+       io.lock.file.fnum = fnum;
        io.lock.in.count = 1;
        io.lock.in.offset = 0;
        status = smb_raw_lock(cli->tree, &io);
@@ -104,7 +104,7 @@ static BOOL test_lock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
 
        printf("Trying 0xEEFFFFFF lock\n");
        io.lock.level = RAW_LOCK_LOCK;
-       io.lock.in.fnum = fnum;
+       io.lock.file.fnum = fnum;
        io.lock.in.count = 4000;
        io.lock.in.offset = 0xEEFFFFFF;
        status = smb_raw_lock(cli->tree, &io);
@@ -122,7 +122,7 @@ static BOOL test_lock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
 
        printf("Trying 0xEF000000 lock\n");
        io.lock.level = RAW_LOCK_LOCK;
-       io.lock.in.fnum = fnum;
+       io.lock.file.fnum = fnum;
        io.lock.in.count = 4000;
        io.lock.in.offset = 0xEEFFFFFF;
        status = smb_raw_lock(cli->tree, &io);
@@ -140,7 +140,7 @@ static BOOL test_lock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
 
        printf("Trying max lock\n");
        io.lock.level = RAW_LOCK_LOCK;
-       io.lock.in.fnum = fnum;
+       io.lock.file.fnum = fnum;
        io.lock.in.count = 4000;
        io.lock.in.offset = 0xEF000000;
        status = smb_raw_lock(cli->tree, &io);
@@ -158,7 +158,7 @@ static BOOL test_lock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
 
        printf("Trying wrong pid unlock\n");
        io.lock.level = RAW_LOCK_LOCK;
-       io.lock.in.fnum = fnum;
+       io.lock.file.fnum = fnum;
        io.lock.in.count = 4002;
        io.lock.in.offset = 10001;
        status = smb_raw_lock(cli->tree, &io);
@@ -206,7 +206,7 @@ static BOOL test_lockx(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        }
 
        io.lockx.level = RAW_LOCK_LOCKX;
-       io.lockx.in.fnum = fnum;
+       io.lockx.file.fnum = fnum;
        io.lockx.in.mode = LOCKING_ANDX_LARGE_FILES;
        io.lockx.in.timeout = 0;
        io.lockx.in.ulock_cnt = 0;
@@ -394,7 +394,7 @@ static BOOL test_pidhigh(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        }
 
        io.lockx.level = RAW_LOCK_LOCKX;
-       io.lockx.in.fnum = fnum;
+       io.lockx.file.fnum = fnum;
        io.lockx.in.mode = LOCKING_ANDX_LARGE_FILES;
        io.lockx.in.timeout = 0;
        io.lockx.in.ulock_cnt = 0;
@@ -468,7 +468,7 @@ static BOOL test_async(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        }
 
        io.lockx.level = RAW_LOCK_LOCKX;
-       io.lockx.in.fnum = fnum;
+       io.lockx.file.fnum = fnum;
        io.lockx.in.mode = LOCKING_ANDX_LARGE_FILES;
        io.lockx.in.timeout = 0;
        io.lockx.in.ulock_cnt = 0;
@@ -621,7 +621,7 @@ static BOOL test_changetype(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        }
 
        io.lockx.level = RAW_LOCK_LOCKX;
-       io.lockx.in.fnum = fnum;
+       io.lockx.file.fnum = fnum;
        io.lockx.in.mode = LOCKING_ANDX_SHARED_LOCK;
        io.lockx.in.timeout = 0;
        io.lockx.in.ulock_cnt = 0;
index 97a1bf3cc4ac08c8f375e8fc60080a8f288acf8b..6cf3634f11d197d4cf792685be8bf75204942b75 100644 (file)
@@ -65,13 +65,13 @@ static BOOL test_mux_open(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        io.ntcreatex.in.fname = BASEDIR "\\open.dat";
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum1 = io.ntcreatex.out.fnum;
+       fnum1 = io.ntcreatex.file.fnum;
 
        printf("send 2nd open, non-conflicting\n");
        io.ntcreatex.in.open_disposition = NTCREATEX_DISP_OPEN;
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum2 = io.ntcreatex.out.fnum;
+       fnum2 = io.ntcreatex.file.fnum;
 
        tv = timeval_current();
 
@@ -131,7 +131,7 @@ static BOOL test_mux_open(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        }
 
        printf("close the 1st async open\n");
-       smbcli_close(cli->tree, io.ntcreatex.out.fnum);
+       smbcli_close(cli->tree, io.ntcreatex.file.fnum);
 
 done:
        return ret;
@@ -171,7 +171,7 @@ static BOOL test_mux_write(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
 
        /* send an async write */
        io.generic.level = RAW_WRITE_WRITEX;
-       io.writex.in.fnum = fnum;
+       io.writex.file.fnum = fnum;
        io.writex.in.offset = 0;
        io.writex.in.wmode = 0;
        io.writex.in.remaining = 0;
@@ -217,7 +217,7 @@ static BOOL test_mux_lock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
 
        printf("establishing a lock\n");
        io.lockx.level = RAW_LOCK_LOCKX;
-       io.lockx.in.fnum = fnum;
+       io.lockx.file.fnum = fnum;
        io.lockx.in.mode = 0;
        io.lockx.in.timeout = 0;
        io.lockx.in.lock_cnt = 1;
@@ -258,7 +258,7 @@ static BOOL test_mux_lock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        printf("Now trying with a cancel\n");
 
        io.lockx.level = RAW_LOCK_LOCKX;
-       io.lockx.in.fnum = fnum;
+       io.lockx.file.fnum = fnum;
        io.lockx.in.mode = 0;
        io.lockx.in.timeout = 0;
        io.lockx.in.lock_cnt = 1;
index 7e96beb646e18becb57649af7a3969f9b5d40810..766c5374a909905d9cfc3ea700965be9312a9745 100644 (file)
@@ -60,7 +60,7 @@ BOOL torture_raw_notify(void)
        BOOL ret = True;
        TALLOC_CTX *mem_ctx;
        NTSTATUS status;
-       struct smb_notify notify;
+       union smb_notify notify;
        union smb_open io;
        int i, count, fnum, fnum2;
        struct smbcli_request *req, *req2;
@@ -94,17 +94,17 @@ BOOL torture_raw_notify(void)
 
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum = io.ntcreatex.out.fnum;
+       fnum = io.ntcreatex.file.fnum;
 
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum2 = io.ntcreatex.out.fnum;
+       fnum2 = io.ntcreatex.file.fnum;
 
        /* ask for a change notify */
-       notify.in.buffer_size = 1000;
-       notify.in.completion_filter = 0x3;
-       notify.in.fnum = fnum;
-       notify.in.recursive = True;
+       notify.notify.in.buffer_size = 1000;
+       notify.notify.in.completion_filter = 0x3;
+       notify.notify.file.fnum = fnum;
+       notify.notify.in.recursive = True;
 
        printf("testing notify mkdir\n");
 
@@ -114,9 +114,9 @@ BOOL torture_raw_notify(void)
        status = smb_raw_changenotify_recv(req, mem_ctx, &notify);
        CHECK_STATUS(status, NT_STATUS_OK);
 
-       CHECK_VAL(notify.out.num_changes, 1);
-       CHECK_VAL(notify.out.changes[0].action, NOTIFY_ACTION_ADDED);
-       CHECK_WSTR(notify.out.changes[0].name, "subdir-name", STR_UNICODE);
+       CHECK_VAL(notify.notify.out.num_changes, 1);
+       CHECK_VAL(notify.notify.out.changes[0].action, NOTIFY_ACTION_ADDED);
+       CHECK_WSTR(notify.notify.out.changes[0].name, "subdir-name", STR_UNICODE);
 
        printf("testing notify rmdir\n");
 
@@ -125,9 +125,9 @@ BOOL torture_raw_notify(void)
 
        status = smb_raw_changenotify_recv(req, mem_ctx, &notify);
        CHECK_STATUS(status, NT_STATUS_OK);
-       CHECK_VAL(notify.out.num_changes, 1);
-       CHECK_VAL(notify.out.changes[0].action, NOTIFY_ACTION_REMOVED);
-       CHECK_WSTR(notify.out.changes[0].name, "subdir-name", STR_UNICODE);
+       CHECK_VAL(notify.notify.out.num_changes, 1);
+       CHECK_VAL(notify.notify.out.changes[0].action, NOTIFY_ACTION_REMOVED);
+       CHECK_WSTR(notify.notify.out.changes[0].name, "subdir-name", STR_UNICODE);
 
        printf("testing notify cancel\n");
 
@@ -154,12 +154,12 @@ BOOL torture_raw_notify(void)
 
        /* setup a new notify on a different directory handle. This
           new notify won't see the events above. */
-       notify.in.fnum = fnum2;
+       notify.notify.file.fnum = fnum2;
        req2 = smb_raw_changenotify_send(cli->tree, &notify);
 
        /* whereas this notify will see the above buffered events as
           well */
-       notify.in.fnum = fnum;
+       notify.notify.file.fnum = fnum;
        req = smb_raw_changenotify_send(cli->tree, &notify);
 
        status = smbcli_unlink(cli->tree, BASEDIR "\\test0.txt");
@@ -169,16 +169,16 @@ BOOL torture_raw_notify(void)
        status = smb_raw_changenotify_recv(req, mem_ctx, &notify);
        CHECK_STATUS(status, NT_STATUS_OK);
 
-       CHECK_VAL(notify.out.num_changes, count+1);
-       for (i=0;i<notify.out.num_changes;i++) {
-               CHECK_VAL(notify.out.changes[i].action, NOTIFY_ACTION_ADDED);
+       CHECK_VAL(notify.notify.out.num_changes, count+1);
+       for (i=0;i<notify.notify.out.num_changes;i++) {
+               CHECK_VAL(notify.notify.out.changes[i].action, NOTIFY_ACTION_ADDED);
        }
-       CHECK_WSTR(notify.out.changes[0].name, "subdir-name", STR_UNICODE);
+       CHECK_WSTR(notify.notify.out.changes[0].name, "subdir-name", STR_UNICODE);
 
        /* and now from the 1st notify */
        status = smb_raw_changenotify_recv(req2, mem_ctx, &notify);
        CHECK_STATUS(status, NT_STATUS_OK);
-       CHECK_VAL(notify.out.num_changes, 1);
+       CHECK_VAL(notify.notify.out.num_changes, 1);
 
        printf("testing notify on wildcard unlink for %d files\n", count);
 
@@ -189,26 +189,26 @@ BOOL torture_raw_notify(void)
        status = smb_raw_changenotify_recv(req, mem_ctx, &notify);
        CHECK_STATUS(status, NT_STATUS_OK);
 
-       CHECK_VAL(notify.out.num_changes, 1);
-       CHECK_VAL(notify.out.changes[0].action, NOTIFY_ACTION_REMOVED);
-       CHECK_WSTR(notify.out.changes[0].name, "test0.txt", STR_UNICODE);
+       CHECK_VAL(notify.notify.out.num_changes, 1);
+       CHECK_VAL(notify.notify.out.changes[0].action, NOTIFY_ACTION_REMOVED);
+       CHECK_WSTR(notify.notify.out.changes[0].name, "test0.txt", STR_UNICODE);
 
        /* and we now see the rest of the unlink calls */
        req = smb_raw_changenotify_send(cli->tree, &notify);
        status = smb_raw_changenotify_recv(req, mem_ctx, &notify);
        CHECK_STATUS(status, NT_STATUS_OK);
-       CHECK_VAL(notify.out.num_changes, count-1);
-       for (i=0;i<notify.out.num_changes;i++) {
-               CHECK_VAL(notify.out.changes[i].action, NOTIFY_ACTION_REMOVED);
+       CHECK_VAL(notify.notify.out.num_changes, count-1);
+       for (i=0;i<notify.notify.out.num_changes;i++) {
+               CHECK_VAL(notify.notify.out.changes[i].action, NOTIFY_ACTION_REMOVED);
        }
 
-       notify.in.fnum = fnum2;
+       notify.notify.file.fnum = fnum2;
        req = smb_raw_changenotify_send(cli->tree, &notify);
        status = smb_raw_changenotify_recv(req, mem_ctx, &notify);
        CHECK_STATUS(status, NT_STATUS_OK);
-       CHECK_VAL(notify.out.num_changes, count-1);
-       for (i=0;i<notify.out.num_changes;i++) {
-               CHECK_VAL(notify.out.changes[i].action, NOTIFY_ACTION_REMOVED);
+       CHECK_VAL(notify.notify.out.num_changes, count-1);
+       for (i=0;i<notify.notify.out.num_changes;i++) {
+               CHECK_VAL(notify.notify.out.changes[i].action, NOTIFY_ACTION_REMOVED);
        }
 
 done:
index 1346a075f2c440210c72d68252361c2b9a57c736..06b78a547cdfe27184ed8cb8cd50c5a2687cef31 100644 (file)
@@ -87,7 +87,7 @@ static const char *rdwr_string(enum rdwr_mode m)
 #define CHECK_TIME(t, field) do { \
        time_t t1, t2; \
        finfo.all_info.level = RAW_FILEINFO_ALL_INFO; \
-       finfo.all_info.in.fname = fname; \
+       finfo.all_info.file.path = fname; \
        status = smb_raw_pathinfo(cli->tree, mem_ctx, &finfo); \
        CHECK_STATUS(status, NT_STATUS_OK); \
        t1 = t & ~1; \
@@ -104,7 +104,7 @@ static const char *rdwr_string(enum rdwr_mode m)
 #define CHECK_NTTIME(t, field) do { \
        NTTIME t2; \
        finfo.all_info.level = RAW_FILEINFO_ALL_INFO; \
-       finfo.all_info.in.fname = fname; \
+       finfo.all_info.file.path = fname; \
        status = smb_raw_pathinfo(cli->tree, mem_ctx, &finfo); \
        CHECK_STATUS(status, NT_STATUS_OK); \
        t2 = finfo.all_info.out.field; \
@@ -119,7 +119,7 @@ static const char *rdwr_string(enum rdwr_mode m)
 
 #define CHECK_ALL_INFO(v, field) do { \
        finfo.all_info.level = RAW_FILEINFO_ALL_INFO; \
-       finfo.all_info.in.fname = fname; \
+       finfo.all_info.file.path = fname; \
        status = smb_raw_pathinfo(cli->tree, mem_ctx, &finfo); \
        CHECK_STATUS(status, NT_STATUS_OK); \
        if ((v) != (finfo.all_info.out.field)) { \
@@ -139,7 +139,7 @@ static const char *rdwr_string(enum rdwr_mode m)
 #define SET_ATTRIB(sattrib) do { \
        union smb_setfileinfo sfinfo; \
        sfinfo.generic.level = RAW_SFILEINFO_BASIC_INFORMATION; \
-       sfinfo.generic.file.fname = fname; \
+       sfinfo.generic.file.path = fname; \
        ZERO_STRUCT(sfinfo.basic_info.in); \
        sfinfo.basic_info.in.attrib = sattrib; \
        status = smb_raw_setpathinfo(cli->tree, &sfinfo); \
@@ -168,7 +168,7 @@ static BOOL test_open(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        io.openold.in.search_attrs = 0;
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_NOT_FOUND);
-       fnum = io.openold.out.fnum;
+       fnum = io.openold.file.fnum;
 
        smbcli_unlink(cli->tree, fname);
        CREATE_FILE;
@@ -176,12 +176,12 @@ static BOOL test_open(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
 
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum = io.openold.out.fnum;
+       fnum = io.openold.file.fnum;
        CHECK_RDWR(fnum, RDWR_RDWR);
 
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum2 = io.openold.out.fnum;
+       fnum2 = io.openold.file.fnum;
        CHECK_RDWR(fnum2, RDWR_RDWR);
        smbcli_close(cli->tree, fnum2);
        smbcli_close(cli->tree, fnum);
@@ -194,21 +194,21 @@ static BOOL test_open(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        io.openold.in.open_mode = OPEN_FLAGS_OPEN_READ;
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum = io.openold.out.fnum;
+       fnum = io.openold.file.fnum;
        CHECK_RDWR(fnum, RDWR_RDONLY);
        smbcli_close(cli->tree, fnum);
 
        io.openold.in.open_mode = OPEN_FLAGS_OPEN_WRITE;
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum = io.openold.out.fnum;
+       fnum = io.openold.file.fnum;
        CHECK_RDWR(fnum, RDWR_WRONLY);
        smbcli_close(cli->tree, fnum);
 
        io.openold.in.open_mode = OPEN_FLAGS_OPEN_RDWR;
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum = io.openold.out.fnum;
+       fnum = io.openold.file.fnum;
        CHECK_RDWR(fnum, RDWR_RDWR);
        smbcli_close(cli->tree, fnum);
 
@@ -216,7 +216,7 @@ static BOOL test_open(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        io.openold.in.open_mode = OPEN_FLAGS_OPEN_RDWR | OPEN_FLAGS_DENY_WRITE;
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum = io.openold.out.fnum;
+       fnum = io.openold.file.fnum;
        CHECK_RDWR(fnum, RDWR_RDWR);
        
        if (io.openold.in.open_mode != io.openold.out.rmode) {
@@ -231,7 +231,7 @@ static BOOL test_open(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        io.openold.in.open_mode = OPEN_FLAGS_OPEN_READ | OPEN_FLAGS_DENY_NONE;
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum2 = io.openold.out.fnum;
+       fnum2 = io.openold.file.fnum;
        CHECK_RDWR(fnum2, RDWR_RDONLY);
        smbcli_close(cli->tree, fnum);
        smbcli_close(cli->tree, fnum2);
@@ -244,7 +244,7 @@ static BOOL test_open(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        io.openold.in.open_mode = OPEN_FLAGS_OPEN_READ;
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum = io.openold.out.fnum;
+       fnum = io.openold.file.fnum;
 
        /* check other reply fields */
        CHECK_TIME(io.openold.out.write_time, write_time);
@@ -325,7 +325,7 @@ static BOOL test_openx(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
                        ret = False;
                }
                if (NT_STATUS_IS_OK(status)) {
-                       smbcli_close(cli->tree, io.openx.out.fnum);
+                       smbcli_close(cli->tree, io.openx.file.fnum);
                }
                if (open_funcs[i].with_file) {
                        smbcli_unlink(cli->tree, fname);
@@ -338,7 +338,7 @@ static BOOL test_openx(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        io.openx.in.open_func = OPENX_OPEN_FUNC_OPEN | OPENX_OPEN_FUNC_CREATE;
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum = io.openx.out.fnum;
+       fnum = io.openx.file.fnum;
 
        CHECK_ALL_INFO(io.openx.out.size, size);
        CHECK_TIME(io.openx.out.write_time, write_time);
@@ -363,7 +363,7 @@ static BOOL test_openx(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        io.openx.in.open_func = OPENX_OPEN_FUNC_OPEN;
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum = io.openx.out.fnum;
+       fnum = io.openx.file.fnum;
 
        CHECK_ALL_INFO(io.openx.out.size, size);
        CHECK_TIME(io.openx.out.write_time, write_time);
@@ -379,12 +379,12 @@ static BOOL test_openx(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        io.openx.in.search_attrs = FILE_ATTRIBUTE_HIDDEN;
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       smbcli_close(cli->tree, io.openx.out.fnum);
+       smbcli_close(cli->tree, io.openx.file.fnum);
 
        io.openx.in.search_attrs = 0;
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       smbcli_close(cli->tree, io.openx.out.fnum);
+       smbcli_close(cli->tree, io.openx.file.fnum);
 
        SET_ATTRIB(FILE_ATTRIBUTE_NORMAL);
        smbcli_unlink(cli->tree, fname);
@@ -397,7 +397,7 @@ static BOOL test_openx(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        CHECK_STATUS(status, NT_STATUS_OK);
        CHECK_ALL_INFO(FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_ARCHIVE, 
                       attrib & ~FILE_ATTRIBUTE_NONINDEXED);
-       smbcli_close(cli->tree, io.openx.out.fnum);
+       smbcli_close(cli->tree, io.openx.file.fnum);
        smbcli_unlink(cli->tree, fname);
 
        /* check timeout on create - win2003 ignores the timeout! */
@@ -406,7 +406,7 @@ static BOOL test_openx(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        io.openx.in.open_mode = OPENX_MODE_ACCESS_RDWR | OPENX_MODE_DENY_ALL;
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum = io.openx.out.fnum;
+       fnum = io.openx.file.fnum;
 
        io.openx.in.timeout = 20000;
        tv = timeval_current();
@@ -433,7 +433,7 @@ static BOOL test_openx(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        io.openx.in.timeout = 0;
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       smbcli_close(cli->tree, io.openx.out.fnum);
+       smbcli_close(cli->tree, io.openx.file.fnum);
 
        /* check the extended return flag */
        io.openx.in.flags = OPENX_FLAGS_ADDITIONAL_INFO | OPENX_FLAGS_EXTENDED_RETURN;
@@ -441,7 +441,7 @@ static BOOL test_openx(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
        CHECK_VAL(io.openx.out.access_mask, SEC_STD_ALL);
-       smbcli_close(cli->tree, io.openx.out.fnum);
+       smbcli_close(cli->tree, io.openx.file.fnum);
 
        io.openx.in.fname = "\\A.+,;=[].B";
        status = smb_raw_open(cli->tree, mem_ctx, &io);
@@ -467,8 +467,8 @@ static BOOL test_openx(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        CHECK_STATUS(status, NT_STATUS_OK);
 
        /* Can we read and write ? */
-       CHECK_RDWR(io.openx.out.fnum, RDWR_RDONLY);
-       smbcli_close(cli->tree, io.openx.out.fnum);
+       CHECK_RDWR(io.openx.file.fnum, RDWR_RDONLY);
+       smbcli_close(cli->tree, io.openx.file.fnum);
        smbcli_unlink(cli->tree, fname);
 
 done:
@@ -563,7 +563,7 @@ static BOOL test_t2open(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
                        ret = False;
                }
                if (NT_STATUS_IS_OK(status)) {
-                       smbcli_close(cli->tree, io.t2open.out.fnum);
+                       smbcli_close(cli->tree, io.t2open.file.fnum);
                }
        }
 
@@ -576,7 +576,7 @@ static BOOL test_t2open(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        io.t2open.in.fname = fname;
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum = io.t2open.out.fnum;
+       fnum = io.t2open.file.fnum;
 
        CHECK_ALL_INFO(io.t2open.out.size, size);
 #if 0
@@ -603,11 +603,11 @@ static BOOL test_t2open(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
 
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       smbcli_close(cli->tree, io.t2open.out.fnum);
+       smbcli_close(cli->tree, io.t2open.file.fnum);
 
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       smbcli_close(cli->tree, io.t2open.out.fnum);
+       smbcli_close(cli->tree, io.t2open.file.fnum);
 
        SET_ATTRIB(FILE_ATTRIBUTE_NORMAL);
        smbcli_unlink(cli->tree, fname);
@@ -704,7 +704,7 @@ static BOOL test_ntcreatex(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
                        ret = False;
                }
                if (NT_STATUS_IS_OK(status) || open_funcs[i].with_file) {
-                       smbcli_close(cli->tree, io.ntcreatex.out.fnum);
+                       smbcli_close(cli->tree, io.ntcreatex.file.fnum);
                        smbcli_unlink(cli->tree, fname);
                }
        }
@@ -714,7 +714,7 @@ static BOOL test_ntcreatex(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
 
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum = io.ntcreatex.out.fnum;
+       fnum = io.ntcreatex.file.fnum;
 
        CHECK_VAL(io.ntcreatex.out.oplock_level, 0);
        CHECK_VAL(io.ntcreatex.out.create_action, NTCREATEX_ACTION_CREATED);
@@ -741,7 +741,7 @@ static BOOL test_ntcreatex(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        io.ntcreatex.in.open_disposition = NTCREATEX_DISP_OPEN;
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum = io.ntcreatex.out.fnum;
+       fnum = io.ntcreatex.file.fnum;
 
        CHECK_VAL(io.ntcreatex.out.oplock_level, 0);
        CHECK_VAL(io.ntcreatex.out.create_action, NTCREATEX_ACTION_EXISTED);
@@ -778,7 +778,7 @@ static BOOL test_ntcreatex(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        io.ntcreatex.in.share_access = NTCREATEX_SHARE_ACCESS_READ | NTCREATEX_SHARE_ACCESS_WRITE;
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum = io.ntcreatex.out.fnum;
+       fnum = io.ntcreatex.file.fnum;
 
        CHECK_VAL(io.ntcreatex.out.oplock_level, 0);
        CHECK_VAL(io.ntcreatex.out.create_action, NTCREATEX_ACTION_CREATED);
@@ -879,7 +879,7 @@ static BOOL test_nttrans_create(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
                        ret = False;
                }
                if (NT_STATUS_IS_OK(status) || open_funcs[i].with_file) {
-                       smbcli_close(cli->tree, io.ntcreatex.out.fnum);
+                       smbcli_close(cli->tree, io.ntcreatex.file.fnum);
                        smbcli_unlink(cli->tree, fname);
                }
        }
@@ -889,7 +889,7 @@ static BOOL test_nttrans_create(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
 
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum = io.ntcreatex.out.fnum;
+       fnum = io.ntcreatex.file.fnum;
 
        CHECK_VAL(io.ntcreatex.out.oplock_level, 0);
        CHECK_VAL(io.ntcreatex.out.create_action, NTCREATEX_ACTION_CREATED);
@@ -916,7 +916,7 @@ static BOOL test_nttrans_create(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        io.ntcreatex.in.open_disposition = NTCREATEX_DISP_OPEN;
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum = io.ntcreatex.out.fnum;
+       fnum = io.ntcreatex.file.fnum;
 
        CHECK_VAL(io.ntcreatex.out.oplock_level, 0);
        CHECK_VAL(io.ntcreatex.out.create_action, NTCREATEX_ACTION_EXISTED);
@@ -953,7 +953,7 @@ static BOOL test_nttrans_create(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        io.ntcreatex.in.share_access = NTCREATEX_SHARE_ACCESS_READ | NTCREATEX_SHARE_ACCESS_WRITE;
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum = io.ntcreatex.out.fnum;
+       fnum = io.ntcreatex.file.fnum;
 
        CHECK_VAL(io.ntcreatex.out.oplock_level, 0);
        CHECK_VAL(io.ntcreatex.out.create_action, NTCREATEX_ACTION_CREATED);
@@ -1019,7 +1019,7 @@ static BOOL test_ntcreatex_brlocked(struct smbcli_state *cli, TALLOC_CTX *mem_ct
        CHECK_STATUS(status, NT_STATUS_OK);
 
        io2.lockx.level = RAW_LOCK_LOCKX;
-       io2.lockx.in.fnum = io.ntcreatex.out.fnum;
+       io2.lockx.file.fnum = io.ntcreatex.file.fnum;
        io2.lockx.in.mode = LOCKING_ANDX_LARGE_FILES;
        io2.lockx.in.timeout = 0;
        io2.lockx.in.ulock_cnt = 0;
@@ -1050,8 +1050,8 @@ static BOOL test_ntcreatex_brlocked(struct smbcli_state *cli, TALLOC_CTX *mem_ct
        CHECK_STATUS(status, NT_STATUS_OK);
 
  done:
-       smbcli_close(cli->tree, io.ntcreatex.out.fnum);
-       smbcli_close(cli->tree, io1.ntcreatex.out.fnum);
+       smbcli_close(cli->tree, io.ntcreatex.file.fnum);
+       smbcli_close(cli->tree, io1.ntcreatex.file.fnum);
        smbcli_unlink(cli->tree, fname);
        return ret;
 }
@@ -1077,7 +1077,7 @@ static BOOL test_mknew(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        io.mknew.in.fname = fname;
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum = io.mknew.out.fnum;
+       fnum = io.mknew.file.fnum;
 
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_COLLISION);
@@ -1089,7 +1089,7 @@ static BOOL test_mknew(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        io.mknew.in.write_time = basetime;
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum = io.mknew.out.fnum;
+       fnum = io.mknew.file.fnum;
        CHECK_TIME(basetime, write_time);
 
        smbcli_close(cli->tree, fnum);
@@ -1099,7 +1099,7 @@ static BOOL test_mknew(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        io.mknew.in.attrib = FILE_ATTRIBUTE_HIDDEN;
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum = io.mknew.out.fnum;
+       fnum = io.mknew.file.fnum;
        CHECK_ALL_INFO(FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_ARCHIVE, 
                       attrib & ~FILE_ATTRIBUTE_NONINDEXED);
        
@@ -1132,12 +1132,12 @@ static BOOL test_create(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        io.create.in.fname = fname;
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum = io.create.out.fnum;
+       fnum = io.create.file.fnum;
 
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
 
-       smbcli_close(cli->tree, io.create.out.fnum);
+       smbcli_close(cli->tree, io.create.file.fnum);
        smbcli_close(cli->tree, fnum);
        smbcli_unlink(cli->tree, fname);
 
@@ -1145,7 +1145,7 @@ static BOOL test_create(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        io.create.in.write_time = basetime;
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum = io.create.out.fnum;
+       fnum = io.create.file.fnum;
        CHECK_TIME(basetime, write_time);
 
        smbcli_close(cli->tree, fnum);
@@ -1155,7 +1155,7 @@ static BOOL test_create(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        io.create.in.attrib = FILE_ATTRIBUTE_HIDDEN;
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum = io.create.out.fnum;
+       fnum = io.create.file.fnum;
        CHECK_ALL_INFO(FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_ARCHIVE, 
                       attrib & ~FILE_ATTRIBUTE_NONINDEXED);
        
@@ -1188,12 +1188,12 @@ static BOOL test_ctemp(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        io.ctemp.in.directory = BASEDIR;
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum = io.ctemp.out.fnum;
+       fnum = io.ctemp.file.fnum;
 
        name = io.ctemp.out.name;
 
        finfo.generic.level = RAW_FILEINFO_NAME_INFO;
-       finfo.generic.in.fnum = fnum;
+       finfo.generic.file.fnum = fnum;
        status = smb_raw_fileinfo(cli->tree, mem_ctx, &finfo);
        CHECK_STATUS(status, NT_STATUS_OK);
 
@@ -1251,7 +1251,7 @@ static BOOL test_chained(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
 
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum = io.openxreadx.out.fnum;
+       fnum = io.openxreadx.file.fnum;
 
        if (memcmp(buf, buf2, sizeof(buf)) != 0) {
                d_printf("wrong data in reply buffer\n");
index 6fa4c514b393c30769ed1aa8501ef4e557127384..3d804f8572f36aca3b6e31269c1422c5936c1649 100644 (file)
@@ -88,7 +88,7 @@ static BOOL oplock_handler_close(struct smbcli_transport *transport, uint16_t ti
        printf("Closing in oplock handler\n");
 
        io.close.level = RAW_CLOSE_CLOSE;
-       io.close.in.fnum = fnum;
+       io.close.file.fnum = fnum;
        io.close.in.write_time = 0;
        req = smb_raw_close_send(tree, &io);
        if (req == NULL) {
@@ -111,7 +111,7 @@ static BOOL test_oplock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        NTSTATUS status;
        BOOL ret = True;
        union smb_open io;
-       struct smb_unlink unl;
+       union smb_unlink unl;
        union smb_read rd;
        uint16_t fnum=0, fnum2=0;
 
@@ -141,12 +141,12 @@ static BOOL test_oplock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
 
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum = io.ntcreatex.out.fnum;
+       fnum = io.ntcreatex.file.fnum;
        CHECK_VAL(io.ntcreatex.out.oplock_level, EXCLUSIVE_OPLOCK_RETURN);
 
        printf("unlink it - should be no break\n");
-       unl.in.pattern = fname;
-       unl.in.attrib = 0;
+       unl.unlink.in.pattern = fname;
+       unl.unlink.in.attrib = 0;
        status = smb_raw_unlink(cli->tree, &unl);
        CHECK_STATUS(status, NT_STATUS_SHARING_VIOLATION);
        CHECK_VAL(break_info.count, 0);
@@ -164,12 +164,12 @@ static BOOL test_oplock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
                NTCREATEX_FLAGS_REQUEST_BATCH_OPLOCK;
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum = io.ntcreatex.out.fnum;
+       fnum = io.ntcreatex.file.fnum;
        CHECK_VAL(io.ntcreatex.out.oplock_level, BATCH_OPLOCK_RETURN);
 
        printf("unlink should generate a break\n");
-       unl.in.pattern = fname;
-       unl.in.attrib = 0;
+       unl.unlink.in.pattern = fname;
+       unl.unlink.in.attrib = 0;
        status = smb_raw_unlink(cli->tree, &unl);
        CHECK_STATUS(status, NT_STATUS_SHARING_VIOLATION);
 
@@ -188,11 +188,11 @@ static BOOL test_oplock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
                NTCREATEX_FLAGS_REQUEST_BATCH_OPLOCK;
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum = io.ntcreatex.out.fnum;
+       fnum = io.ntcreatex.file.fnum;
        CHECK_VAL(io.ntcreatex.out.oplock_level, BATCH_OPLOCK_RETURN);
 
-       unl.in.pattern = fname;
-       unl.in.attrib = 0;
+       unl.unlink.in.pattern = fname;
+       unl.unlink.in.attrib = 0;
        ZERO_STRUCT(break_info);
        status = smb_raw_unlink(cli->tree, &unl);
        CHECK_STATUS(status, NT_STATUS_OK);
@@ -212,11 +212,11 @@ static BOOL test_oplock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
                NTCREATEX_FLAGS_REQUEST_BATCH_OPLOCK;
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum = io.ntcreatex.out.fnum;
+       fnum = io.ntcreatex.file.fnum;
        CHECK_VAL(io.ntcreatex.out.oplock_level, BATCH_OPLOCK_RETURN);
 
        rd.read.level = RAW_READ_READ;
-       rd.read.in.fnum = fnum;
+       rd.read.file.fnum = fnum;
        rd.read.in.count = 1;
        rd.read.in.offset = 0;
        rd.read.in.remaining = 0;
@@ -235,7 +235,7 @@ static BOOL test_oplock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
                NTCREATEX_FLAGS_REQUEST_BATCH_OPLOCK;
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum = io.ntcreatex.out.fnum;
+       fnum = io.ntcreatex.file.fnum;
        CHECK_VAL(io.ntcreatex.out.oplock_level, BATCH_OPLOCK_RETURN);
 
        ZERO_STRUCT(break_info);
@@ -259,7 +259,7 @@ static BOOL test_oplock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
                NTCREATEX_FLAGS_REQUEST_BATCH_OPLOCK;
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum2 = io.ntcreatex.out.fnum;
+       fnum2 = io.ntcreatex.file.fnum;
        CHECK_VAL(io.ntcreatex.out.oplock_level, BATCH_OPLOCK_RETURN);
 
        ZERO_STRUCT(break_info);
@@ -269,7 +269,7 @@ static BOOL test_oplock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
                NTCREATEX_FLAGS_REQUEST_BATCH_OPLOCK;
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum = io.ntcreatex.out.fnum;
+       fnum = io.ntcreatex.file.fnum;
        CHECK_VAL(io.ntcreatex.out.oplock_level, BATCH_OPLOCK_RETURN);
 
        CHECK_VAL(break_info.count, 1);
@@ -288,7 +288,7 @@ static BOOL test_oplock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
                NTCREATEX_FLAGS_REQUEST_BATCH_OPLOCK;
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum = io.ntcreatex.out.fnum;
+       fnum = io.ntcreatex.file.fnum;
        CHECK_VAL(io.ntcreatex.out.oplock_level, BATCH_OPLOCK_RETURN);
 
        ZERO_STRUCT(break_info);
@@ -300,7 +300,7 @@ static BOOL test_oplock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        io.ntcreatex.in.access_mask = SEC_FILE_READ_ATTRIBUTE|SEC_FILE_WRITE_ATTRIBUTE|SEC_STD_SYNCHRONIZE;
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum2 = io.ntcreatex.out.fnum;
+       fnum2 = io.ntcreatex.file.fnum;
        CHECK_VAL(io.ntcreatex.out.oplock_level, NO_OPLOCK_RETURN);
        CHECK_VAL(break_info.count, 0);
        CHECK_VAL(break_info.fnum, 0);
@@ -319,7 +319,7 @@ static BOOL test_oplock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        io.ntcreatex.in.open_disposition = NTCREATEX_DISP_CREATE;
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum = io.ntcreatex.out.fnum;
+       fnum = io.ntcreatex.file.fnum;
        CHECK_VAL(io.ntcreatex.out.oplock_level, BATCH_OPLOCK_RETURN);
 
        printf("Subsequent normal open should break oplock on attribute only open to level II\n");
@@ -334,7 +334,7 @@ static BOOL test_oplock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        io.ntcreatex.in.open_disposition = NTCREATEX_DISP_OPEN;
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum2 = io.ntcreatex.out.fnum;
+       fnum2 = io.ntcreatex.file.fnum;
        CHECK_VAL(break_info.count, 1);
        CHECK_VAL(break_info.fnum, fnum);
        CHECK_VAL(break_info.failures, 0);
@@ -351,7 +351,7 @@ static BOOL test_oplock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        io.ntcreatex.in.open_disposition = NTCREATEX_DISP_OPEN;
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       fnum2 = io.ntcreatex.out.fnum;
+       fnum2 = io.ntcreatex.file.fnum;
        CHECK_VAL(break_info.count, 0);
        CHECK_VAL(break_info.failures, 0);
        CHECK_VAL(io.ntcreatex.out.oplock_level, LEVEL_II_OPLOCK_RETURN);
@@ -362,7 +362,7 @@ static BOOL test_oplock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        {
                union smb_write wr;
                wr.write.level = RAW_WRITE_WRITE;
-               wr.write.in.fnum = fnum2;
+               wr.write.file.fnum = fnu