summaryrefslogtreecommitdiff
path: root/source4/libcli/raw
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-03-12 22:48:25 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:57:06 -0500
commita1b295ed4823ce8d06f830b8db9a5d965c934b54 (patch)
tree2de735a28634c011930456f6591072a3c1471263 /source4/libcli/raw
parent33647bd841c1c74e7dc50e93379e372056ac2df1 (diff)
downloadsamba-a1b295ed4823ce8d06f830b8db9a5d965c934b54.tar.gz
samba-a1b295ed4823ce8d06f830b8db9a5d965c934b54.tar.bz2
samba-a1b295ed4823ce8d06f830b8db9a5d965c934b54.zip
r14256: - rename smb_file -> smb_handle
- move it into the in/out substructs again - allow file.path only on smb_fileinfo/smb_setfileinfo metze (This used to be commit be6d5298a2cdb7e7c61d70471bad445645af5963)
Diffstat (limited to 'source4/libcli/raw')
-rw-r--r--source4/libcli/raw/interfaces.h291
-rw-r--r--source4/libcli/raw/rawacl.c4
-rw-r--r--source4/libcli/raw/rawfile.c34
-rw-r--r--source4/libcli/raw/rawfileinfo.c8
-rw-r--r--source4/libcli/raw/rawioctl.c4
-rw-r--r--source4/libcli/raw/rawnotify.c2
-rw-r--r--source4/libcli/raw/rawreadwrite.c18
-rw-r--r--source4/libcli/raw/rawsetfileinfo.c8
8 files changed, 199 insertions, 170 deletions
diff --git a/source4/libcli/raw/interfaces.h b/source4/libcli/raw/interfaces.h
index 086686b9e9..20b729caba 100644
--- a/source4/libcli/raw/interfaces.h
+++ b/source4/libcli/raw/interfaces.h
@@ -40,17 +40,46 @@ struct smb_wire_string {
};
/*
- a generic container for file handles
+ * SMB2 uses a 16Byte handle,
+ * (we can maybe use struct GUID later)
+ */
+struct smb2_handle {
+ uint64_t data[2];
+};
+
+/*
+ * a generic container for file handles or file pathes
+ * for qfileinfo/setfileinfo and qpathinfo/setpathinfo
*/
-union smb_file {
+union smb_handle_or_path {
/*
- * this is only used for
+ * this is used for
* the qpathinfo and setpathinfo
* calls
*/
const char *path;
+ /*
+ * this is used as file handle in SMB
+ */
+ uint16_t fnum;
/*
+ * this is used as file handle in SMB2
+ */
+ struct smb2_handle handle;
+};
+
+/*
+ a generic container for file handles
+*/
+union smb_handle {
+ /*
+ * this is used for
+ * the qpathinfo and setpathinfo
+ * calls
+ */
+ const char *path;
+ /*
* this is used as file handle in SMB
*/
uint16_t fnum;
@@ -58,9 +87,7 @@ union smb_file {
/*
* this is used as file handle in SMB2
*/
- struct smb2_handle {
- uint64_t data[2];
- } handle;
+ struct smb2_handle handle;
};
/*
@@ -71,8 +98,8 @@ union smb_file {
/* struct used for SMBlseek call */
union smb_seek {
struct {
- union smb_file file;
struct {
+ union smb_handle file;
uint16_t mode;
int32_t offset; /* signed */
} in;
@@ -343,8 +370,9 @@ union smb_fileinfo {
* matches RAW_FILEINFO_GENERIC */
struct {
enum smb_fileinfo_level level;
- union smb_file file;
-
+ struct {
+ union smb_handle_or_path file;
+ } in;
struct {
uint32_t attrib;
uint32_t ea_size;
@@ -390,8 +418,9 @@ union smb_fileinfo {
* matches RAW_FILEINFO_GETATTR */
struct {
enum smb_fileinfo_level level;
- union smb_file file;
-
+ struct {
+ union smb_handle_or_path file;
+ } in;
struct {
uint16_t attrib;
uint32_t size;
@@ -402,8 +431,9 @@ union smb_fileinfo {
/* SMBgetattrE and RAW_FILEINFO_STANDARD interface */
struct {
enum smb_fileinfo_level level;
- union smb_file file;
-
+ struct {
+ union smb_handle_or_path file;
+ } in;
struct {
time_t create_time;
time_t access_time;
@@ -417,8 +447,9 @@ union smb_fileinfo {
/* trans2 RAW_FILEINFO_EA_SIZE interface */
struct {
enum smb_fileinfo_level level;
- union smb_file file;
-
+ struct {
+ union smb_handle_or_path file;
+ } in;
struct {
time_t create_time;
time_t access_time;
@@ -433,9 +464,8 @@ union smb_fileinfo {
/* trans2 RAW_FILEINFO_EA_LIST interface */
struct {
enum smb_fileinfo_level level;
- union smb_file file;
-
struct {
+ union smb_handle_or_path file;
uint_t num_names;
struct ea_name {
struct smb_wire_string name;
@@ -451,8 +481,8 @@ union smb_fileinfo {
/* trans2 RAW_FILEINFO_ALL_EAS and RAW_FILEINFO_FULL_EA_INFORMATION interfaces */
struct {
enum smb_fileinfo_level level;
- union smb_file file;
struct {
+ union smb_handle_or_path file;
/* SMB2 only - SMB2_CONTINUE_FLAG_* */
uint8_t continue_flags;
} in;
@@ -463,14 +493,17 @@ union smb_fileinfo {
only valid for a QPATHNAME call - no returned data */
struct {
enum smb_fileinfo_level level;
- union smb_file file;
+ struct {
+ union smb_handle_or_path file;
+ } in;
} is_name_valid;
/* RAW_FILEINFO_BASIC_INFO and RAW_FILEINFO_BASIC_INFORMATION interfaces */
struct {
enum smb_fileinfo_level level;
- union smb_file file;
-
+ struct {
+ union smb_handle_or_path file;
+ } in;
struct {
NTTIME create_time;
NTTIME access_time;
@@ -484,8 +517,9 @@ union smb_fileinfo {
/* RAW_FILEINFO_STANDARD_INFO and RAW_FILEINFO_STANDARD_INFORMATION interfaces */
struct {
enum smb_fileinfo_level level;
- union smb_file file;
-
+ struct {
+ union smb_handle_or_path file;
+ } in;
struct {
uint64_t alloc_size;
uint64_t size;
@@ -498,8 +532,9 @@ union smb_fileinfo {
/* RAW_FILEINFO_EA_INFO and RAW_FILEINFO_EA_INFORMATION interfaces */
struct {
enum smb_fileinfo_level level;
- union smb_file file;
-
+ struct {
+ union smb_handle_or_path file;
+ } in;
struct {
uint32_t ea_size;
} out;
@@ -508,8 +543,9 @@ union smb_fileinfo {
/* RAW_FILEINFO_NAME_INFO and RAW_FILEINFO_NAME_INFORMATION interfaces */
struct {
enum smb_fileinfo_level level;
- union smb_file file;
-
+ struct {
+ union smb_handle_or_path file;
+ } in;
struct {
struct smb_wire_string fname;
} out;
@@ -518,8 +554,9 @@ union smb_fileinfo {
/* RAW_FILEINFO_ALL_INFO and RAW_FILEINFO_ALL_INFORMATION interfaces */
struct {
enum smb_fileinfo_level level;
- union smb_file file;
-
+ struct {
+ union smb_handle_or_path file;
+ } in;
struct {
NTTIME create_time;
NTTIME access_time;
@@ -539,8 +576,9 @@ union smb_fileinfo {
/* RAW_FILEINFO_SMB2_ALL_INFORMATION interface */
struct {
enum smb_fileinfo_level level;
- union smb_file file;
-
+ struct {
+ union smb_handle_or_path file;
+ } in;
struct {
NTTIME create_time;
NTTIME access_time;
@@ -561,13 +599,14 @@ union smb_fileinfo {
uint64_t mode;
struct smb_wire_string fname;
} out;
- } all_info2;
+ } all_info2;
/* RAW_FILEINFO_ALT_NAME_INFO and RAW_FILEINFO_ALT_NAME_INFORMATION interfaces */
struct {
enum smb_fileinfo_level level;
- union smb_file file;
-
+ struct {
+ union smb_handle_or_path file;
+ } in;
struct {
struct smb_wire_string fname;
} out;
@@ -576,8 +615,9 @@ union smb_fileinfo {
/* RAW_FILEINFO_STREAM_INFO and RAW_FILEINFO_STREAM_INFORMATION interfaces */
struct {
enum smb_fileinfo_level level;
- union smb_file file;
-
+ struct {
+ union smb_handle_or_path file;
+ } in;
struct stream_information {
uint_t num_streams;
struct stream_struct *streams;
@@ -587,8 +627,9 @@ union smb_fileinfo {
/* RAW_FILEINFO_COMPRESSION_INFO and RAW_FILEINFO_COMPRESSION_INFORMATION interfaces */
struct {
enum smb_fileinfo_level level;
- union smb_file file;
-
+ struct {
+ union smb_handle_or_path file;
+ } in;
struct {
uint64_t compressed_size;
uint16_t format;
@@ -601,8 +642,9 @@ union smb_fileinfo {
/* RAW_FILEINFO_UNIX_BASIC interface */
struct {
enum smb_fileinfo_level level;
- union smb_file file;
-
+ struct {
+ union smb_handle_or_path file;
+ } in;
struct {
uint64_t end_of_file;
uint64_t num_bytes;
@@ -623,8 +665,9 @@ union smb_fileinfo {
/* RAW_FILEINFO_UNIX_LINK interface */
struct {
enum smb_fileinfo_level level;
- union smb_file file;
-
+ struct {
+ union smb_handle_or_path file;
+ } in;
struct {
struct smb_wire_string link_dest;
} out;
@@ -633,8 +676,9 @@ union smb_fileinfo {
/* RAW_FILEINFO_INTERNAL_INFORMATION interface */
struct {
enum smb_fileinfo_level level;
- union smb_file file;
-
+ struct {
+ union smb_handle_or_path file;
+ } in;
struct {
uint64_t file_id;
} out;
@@ -643,8 +687,9 @@ union smb_fileinfo {
/* RAW_FILEINFO_ACCESS_INFORMATION interface */
struct {
enum smb_fileinfo_level level;
- union smb_file file;
-
+ struct {
+ union smb_handle_or_path file;
+ } in;
struct {
uint32_t access_flags;
} out;
@@ -653,8 +698,9 @@ union smb_fileinfo {
/* RAW_FILEINFO_POSITION_INFORMATION interface */
struct {
enum smb_fileinfo_level level;
- union smb_file file;
-
+ struct {
+ union smb_handle_or_path file;
+ } in;
struct {
uint64_t position;
} out;
@@ -663,8 +709,9 @@ union smb_fileinfo {
/* RAW_FILEINFO_MODE_INFORMATION interface */
struct {
enum smb_fileinfo_level level;
- union smb_file file;
-
+ struct {
+ union smb_handle_or_path file;
+ } in;
struct {
uint32_t mode;
} out;
@@ -673,8 +720,9 @@ union smb_fileinfo {
/* RAW_FILEINFO_ALIGNMENT_INFORMATION interface */
struct {
enum smb_fileinfo_level level;
- union smb_file file;
-
+ struct {
+ union smb_handle_or_path file;
+ } in;
struct {
uint32_t alignment_requirement;
} out;
@@ -683,8 +731,9 @@ union smb_fileinfo {
/* RAW_FILEINFO_NETWORK_OPEN_INFORMATION interface */
struct {
enum smb_fileinfo_level level;
- union smb_file file;
-
+ struct {
+ union smb_handle_or_path file;
+ } in;
struct {
NTTIME create_time;
NTTIME access_time;
@@ -700,8 +749,9 @@ union smb_fileinfo {
/* RAW_FILEINFO_ATTRIBUTE_TAG_INFORMATION interface */
struct {
enum smb_fileinfo_level level;
- union smb_file file;
-
+ struct {
+ union smb_handle_or_path file;
+ } in;
struct {
uint32_t attrib;
uint32_t reparse_tag;
@@ -711,8 +761,8 @@ union smb_fileinfo {
/* RAW_FILEINFO_SEC_DESC */
struct {
enum smb_fileinfo_level level;
- union smb_file file;
struct {
+ union smb_handle_or_path file;
uint32_t secinfo_flags;
} in;
struct {
@@ -756,15 +806,16 @@ union smb_setfileinfo {
/* generic interface */
struct {
enum smb_setfileinfo_level level;
-
- union smb_file file;
+ struct {
+ union smb_handle_or_path file;
+ } in;
} generic;
/* RAW_SFILEINFO_SETATTR (SMBsetatr) interface - only via setpathinfo() */
struct {
enum smb_setfileinfo_level level;
- union smb_file file;
struct {
+ union smb_handle_or_path file;
uint16_t attrib;
time_t write_time;
} in;
@@ -774,8 +825,8 @@ union smb_setfileinfo {
also RAW_SFILEINFO_STANDARD */
struct {
enum smb_setfileinfo_level level;
- union smb_file file;
struct {
+ union smb_handle_or_path file;
time_t create_time;
time_t access_time;
time_t write_time;
@@ -787,8 +838,8 @@ union smb_setfileinfo {
/* RAW_SFILEINFO_EA_SET interface */
struct {
enum smb_setfileinfo_level level;
- union smb_file file;
struct {
+ union smb_handle_or_path file;
uint_t num_eas;
struct ea_struct *eas;
} in;
@@ -798,8 +849,8 @@ union smb_setfileinfo {
RAW_SFILEINFO_BASIC_INFORMATION interfaces */
struct {
enum smb_setfileinfo_level level;
- union smb_file file;
struct {
+ union smb_handle_or_path file;
NTTIME create_time;
NTTIME access_time;
NTTIME write_time;
@@ -812,8 +863,8 @@ union smb_setfileinfo {
RAW_SFILEINFO_DISPOSITION_INFORMATION interfaces */
struct {
enum smb_setfileinfo_level level;
- union smb_file file;
struct {
+ union smb_handle_or_path file;
BOOL delete_on_close;
} in;
} disposition_info;
@@ -822,8 +873,8 @@ union smb_setfileinfo {
RAW_SFILEINFO_ALLOCATION_INFORMATION interfaces */
struct {
enum smb_setfileinfo_level level;
- union smb_file file;
struct {
+ union smb_handle_or_path file;
/* w2k3 rounds this up to nearest 4096 */
uint64_t alloc_size;
} in;
@@ -833,8 +884,8 @@ union smb_setfileinfo {
RAW_SFILEINFO_END_OF_FILE_INFORMATION interfaces */
struct {
enum smb_setfileinfo_level level;
- union smb_file file;
struct {
+ union smb_handle_or_path file;
uint64_t size;
} in;
} end_of_file_info;
@@ -842,8 +893,8 @@ union smb_setfileinfo {
/* RAW_SFILEINFO_RENAME_INFORMATION interface */
struct {
enum smb_setfileinfo_level level;
- union smb_file file;
- struct smb_rename_information {
+ struct {
+ union smb_handle_or_path file;
uint8_t overwrite;
uint32_t root_fid;
const char *new_name;
@@ -853,8 +904,8 @@ union smb_setfileinfo {
/* RAW_SFILEINFO_POSITION_INFORMATION interface */
struct {
enum smb_setfileinfo_level level;
- union smb_file file;
struct {
+ union smb_handle_or_path file;
uint64_t position;
} in;
} position_information;
@@ -862,8 +913,8 @@ union smb_setfileinfo {
/* RAW_SFILEINFO_MODE_INFORMATION interface */
struct {
enum smb_setfileinfo_level level;
- union smb_file file;
struct {
+ union smb_handle_or_path file;
/* valid values seem to be 0, 2, 4 and 6 */
uint32_t mode;
} in;
@@ -874,8 +925,8 @@ union smb_setfileinfo {
/* RAW_SFILEINFO_UNIX_BASIC interface */
struct {
enum smb_setfileinfo_level level;
- union smb_file file;
struct {
+ union smb_handle_or_path file;
uint32_t mode; /* yuck - this field remains to fix compile of libcli/clifile.c */
uint64_t end_of_file;
uint64_t num_bytes;
@@ -896,8 +947,8 @@ union smb_setfileinfo {
/* RAW_SFILEINFO_UNIX_LINK, RAW_SFILEINFO_UNIX_HLINK interface */
struct {
enum smb_setfileinfo_level level;
- union smb_file file;
struct {
+ union smb_handle_or_path file;
const char *link_dest;
} in;
} unix_link, unix_hlink;
@@ -905,8 +956,8 @@ union smb_setfileinfo {
/* RAW_FILEINFO_SET_SEC_DESC */
struct {
enum smb_setfileinfo_level level;
- union smb_file file;
struct {
+ union smb_handle_or_path file;
uint32_t secinfo_flags;
struct security_descriptor *sd;
} in;
@@ -1114,9 +1165,6 @@ union smb_open {
/* SMBNTCreateX interface */
struct {
enum smb_open_level level;
- /* this is the output file handle */
- union smb_file file;
-
struct {
uint32_t flags;
uint32_t root_fid;
@@ -1138,8 +1186,8 @@ union smb_open {
struct security_descriptor *sec_desc;
struct smb_ea_list *ea_list;
} in;
-
struct {
+ union smb_handle file;
uint8_t oplock_level;
uint32_t create_action;
NTTIME create_time;
@@ -1158,9 +1206,6 @@ union smb_open {
/* TRANS2_OPEN interface */
struct {
enum smb_open_level level;
- /* this is the output file handle */
- union smb_file file;
-
struct {
uint16_t flags;
uint16_t open_mode;
@@ -1174,8 +1219,8 @@ union smb_open {
uint_t num_eas;
struct ea_struct *eas;
} in;
-
struct {
+ union smb_handle file;
uint16_t attrib;
time_t write_time;
uint32_t size;
@@ -1190,16 +1235,13 @@ union smb_open {
/* SMBopen interface */
struct {
enum smb_open_level level;
- /* this is the output file handle */
- union smb_file file;
-
struct {
uint16_t open_mode;
uint16_t search_attrs;
const char *fname;
} in;
-
struct {
+ union smb_handle file;
uint16_t attrib;
time_t write_time;
uint32_t size;
@@ -1210,9 +1252,6 @@ union smb_open {
/* SMBopenX interface */
struct {
enum smb_open_level level;
- /* this is the output file handle */
- union smb_file file;
-
struct {
uint16_t flags;
uint16_t open_mode;
@@ -1227,6 +1266,7 @@ union smb_open {
const char *fname;
} in;
struct {
+ union smb_handle file;
uint16_t attrib;
time_t write_time;
uint32_t size;
@@ -1243,28 +1283,26 @@ union smb_open {
/* SMBmknew interface */
struct {
enum smb_open_level level;
- /* this is the output file handle */
- union smb_file file;
-
struct {
uint16_t attrib;
time_t write_time;
const char *fname;
} in;
+ struct {
+ union smb_handle file;
+ } out;
} mknew, create;
/* SMBctemp interface */
struct {
enum smb_open_level level;
- /* this is the output file handle */
- union smb_file file;
-
struct {
uint16_t attrib;
time_t write_time;
const char *directory;
} in;
struct {
+ union smb_handle file;
/* temp name, relative to directory */
char *name;
} out;
@@ -1273,23 +1311,20 @@ union smb_open {
/* SMBsplopen interface */
struct {
enum smb_open_level level;
- /* this is the output file handle */
- union smb_file file;
-
struct {
uint16_t setup_length;
uint16_t mode;
const char *ident;
} in;
+ struct {
+ union smb_handle file;
+ } out;
} splopen;
/* chained OpenX/ReadX interface */
struct {
enum smb_open_level level;
- /* this is the output file handle */
- union smb_file file;
-
struct {
uint16_t flags;
uint16_t open_mode;
@@ -1310,6 +1345,7 @@ union smb_open {
uint16_t remaining;
} in;
struct {
+ union smb_handle file;
uint16_t attrib;
time_t write_time;
uint32_t size;
@@ -1345,9 +1381,8 @@ union smb_read {
/* SMBreadX (and generic) interface */
struct {
enum smb_read_level level;
- union smb_file file;
-
struct {
+ union smb_handle file;
uint64_t offset;
uint16_t mincnt;
uint32_t maxcnt;
@@ -1365,9 +1400,8 @@ union smb_read {
/* SMBreadbraw interface */
struct {
enum smb_read_level level;
- union smb_file file;
-
struct {
+ union smb_handle file;
uint64_t offset;
uint16_t maxcnt;
uint16_t mincnt;
@@ -1383,9 +1417,8 @@ union smb_read {
/* SMBlockandread interface */
struct {
enum smb_read_level level;
- union smb_file file;
-
struct {
+ union smb_handle file;
uint16_t count;
uint32_t offset;
uint16_t remaining;
@@ -1399,9 +1432,8 @@ union smb_read {
/* SMBread interface */
struct {
enum smb_read_level level;
- union smb_file file;
-
struct {
+ union smb_handle file;
uint16_t count;
uint32_t offset;
uint16_t remaining;
@@ -1426,9 +1458,8 @@ union smb_write {
/* SMBwriteX interface */
struct {
enum smb_write_level level;
- union smb_file file;
-
struct {
+ union smb_handle file;
uint64_t offset;
uint16_t wmode;
uint16_t remaining;
@@ -1444,9 +1475,8 @@ union smb_write {
/* SMBwriteunlock interface */
struct {
enum smb_write_level level;
- union smb_file file;
-
struct {
+ union smb_handle file;
uint16_t count;
uint32_t offset;
uint16_t remaining;
@@ -1460,9 +1490,8 @@ union smb_write {
/* SMBwrite interface */
struct {
enum smb_write_level level;
- union smb_file file;
-
struct {
+ union smb_handle file;
uint16_t count;
uint32_t offset;
uint16_t remaining;
@@ -1476,9 +1505,8 @@ union smb_write {
/* SMBwriteclose interface */
struct {
enum smb_write_level level;
- union smb_file file;
-
struct {
+ union smb_handle file;
uint16_t count;
uint32_t offset;
time_t mtime;
@@ -1492,9 +1520,8 @@ union smb_write {
/* SMBsplwrite interface */
struct {
enum smb_write_level level;
- union smb_file file;
-
struct {
+ union smb_handle file;
uint16_t count;
const uint8_t *data;
} in;
@@ -1513,9 +1540,8 @@ union smb_lock {
/* SMBlockingX (and generic) interface */
struct {
enum smb_lock_level level;
- union smb_file file;
-
struct {
+ union smb_handle file;
uint16_t mode;
uint32_t timeout;
uint16_t ulock_cnt;
@@ -1531,9 +1557,8 @@ union smb_lock {
/* SMBlock and SMBunlock interface */
struct {
enum smb_lock_level level;
- union smb_file file;
-
struct {
+ union smb_handle file;
uint32_t count;
uint32_t offset;
} in;
@@ -1552,9 +1577,8 @@ union smb_close {
/* SMBclose (and generic) interface */
struct {
enum smb_close_level level;
- union smb_file file;
-
struct {
+ union smb_handle file;
time_t write_time;
} in;
} close, generic;
@@ -1562,7 +1586,9 @@ union smb_close {
/* SMBsplclose interface - empty! */
struct {
enum smb_close_level level;
- union smb_file file;
+ struct {
+ union smb_handle file;
+ } in;
} splclose;
};
@@ -1611,15 +1637,16 @@ union smb_ioctl {
/* generic interface */
struct {
enum smb_ioctl_level level;
- union smb_file file;
-
+ struct {
+ union smb_handle file;
+ } in;
} generic;
/* struct for SMBioctl */
struct {
enum smb_ioctl_level level;
- union smb_file file;
struct {
+ union smb_handle file;
uint32_t request;
} in;
struct {
@@ -1631,8 +1658,8 @@ union smb_ioctl {
/* struct for NT ioctl call */
struct {
enum smb_ioctl_level level;
- union smb_file file;
struct {
+ union smb_handle file;
uint32_t function;
BOOL fsctl;
uint8_t filter;
@@ -1646,7 +1673,9 @@ union smb_ioctl {
/* struct for SMBflush */
union smb_flush {
struct {
- union smb_file file;
+ struct {
+ union smb_handle file;
+ } in;
} flush;
};
@@ -1714,8 +1743,8 @@ struct smb_nttrans {
/* struct for nttrans change notify call */
union smb_notify {
struct {
- union smb_file file;
struct {
+ union smb_handle file;
uint32_t buffer_size;
uint32_t completion_filter;
BOOL recursive;
diff --git a/source4/libcli/raw/rawacl.c b/source4/libcli/raw/rawacl.c
index 7c0c17b4d7..59ac65a340 100644
--- a/source4/libcli/raw/rawacl.c
+++ b/source4/libcli/raw/rawacl.c
@@ -38,7 +38,7 @@ struct smbcli_request *smb_raw_query_secdesc_send(struct smbcli_tree *tree,
nt.in.function = NT_TRANSACT_QUERY_SECURITY_DESC;
nt.in.setup = NULL;
- SSVAL(params, 0, io->query_secdesc.file.fnum);
+ SSVAL(params, 0, io->query_secdesc.in.file.fnum);
SSVAL(params, 2, 0); /* padding */
SIVAL(params, 4, io->query_secdesc.in.secinfo_flags);
@@ -123,7 +123,7 @@ struct smbcli_request *smb_raw_set_secdesc_send(struct smbcli_tree *tree,
nt.in.function = NT_TRANSACT_SET_SECURITY_DESC;
nt.in.setup = NULL;
- SSVAL(params, 0, io->set_secdesc.file.fnum);
+ SSVAL(params, 0, io->set_secdesc.in.file.fnum);
SSVAL(params, 2, 0); /* padding */
SIVAL(params, 4, io->set_secdesc.in.secinfo_flags);
diff --git a/source4/libcli/raw/rawfile.c b/source4/libcli/raw/rawfile.c
index 0e63fa656f..6f8befebfe 100644
--- a/source4/libcli/raw/rawfile.c
+++ b/source4/libcli/raw/rawfile.c
@@ -234,7 +234,7 @@ static NTSTATUS smb_raw_nttrans_create_recv(struct smbcli_request *req,
params = nt.out.params.data;
parms->ntcreatex.out.oplock_level = CVAL(params, 0);
- parms->ntcreatex.file.fnum = SVAL(params, 2);
+ parms->ntcreatex.out.file.fnum = SVAL(params, 2);
parms->ntcreatex.out.create_action = IVAL(params, 4);
parms->ntcreatex.out.create_time = smbcli_pull_nttime(params, 12);
parms->ntcreatex.out.access_time = smbcli_pull_nttime(params, 20);
@@ -406,7 +406,7 @@ static NTSTATUS smb_raw_t2open_recv(struct smbcli_request *req, TALLOC_CTX *mem_
return NT_STATUS_INFO_LENGTH_MISMATCH;
}
- parms->t2open.file.fnum = SVAL(t2.out.params.data, VWV(0));
+ parms->t2open.out.file.fnum = SVAL(t2.out.params.data, VWV(0));
parms->t2open.out.attrib = SVAL(t2.out.params.data, VWV(1));
parms->t2open.out.write_time = raw_pull_dos_date3(transport, t2.out.params.data + VWV(2));
parms->t2open.out.size = IVAL(t2.out.params.data, VWV(4));
@@ -572,7 +572,7 @@ NTSTATUS smb_raw_open_recv(struct smbcli_request *req, TALLOC_CTX *mem_ctx, unio
case RAW_OPEN_OPEN:
SMBCLI_CHECK_WCT(req, 7);
- parms->openold.file.fnum = SVAL(req->in.vwv, VWV(0));
+ parms->openold.out.file.fnum = SVAL(req->in.vwv, VWV(0));
parms->openold.out.attrib = SVAL(req->in.vwv, VWV(1));
parms->openold.out.write_time = raw_pull_dos_date3(req->transport,
req->in.vwv + VWV(2));
@@ -582,7 +582,7 @@ NTSTATUS smb_raw_open_recv(struct smbcli_request *req, TALLOC_CTX *mem_ctx, unio
case RAW_OPEN_OPENX:
SMBCLI_CHECK_MIN_WCT(req, 15);
- parms->openx.file.fnum = SVAL(req->in.vwv, VWV(2));
+ parms->openx.out.file.fnum = SVAL(req->in.vwv, VWV(2));
parms->openx.out.attrib = SVAL(req->in.vwv, VWV(3));
parms->openx.out.write_time = raw_pull_dos_date3(req->transport,
req->in.vwv + VWV(4));
@@ -603,29 +603,29 @@ NTSTATUS smb_raw_open_recv(struct smbcli_request *req, TALLOC_CTX *mem_ctx, unio
case RAW_OPEN_MKNEW:
SMBCLI_CHECK_WCT(req, 1);
- parms->mknew.file.fnum = SVAL(req->in.vwv, VWV(0));
+ parms->mknew.out.file.fnum = SVAL(req->in.vwv, VWV(0));
break;
case RAW_OPEN_CREATE:
SMBCLI_CHECK_WCT(req, 1);
- parms->create.file.fnum = SVAL(req->in.vwv, VWV(0));
+ parms->create.out.file.fnum = SVAL(req->in.vwv, VWV(0));
break;
case RAW_OPEN_CTEMP:
SMBCLI_CHECK_WCT(req, 1);
- parms->ctemp.file.fnum = SVAL(req->in.vwv, VWV(0));
+ parms->ctemp.out.file.fnum = SVAL(req->in.vwv, VWV(0));
smbcli_req_pull_string(req, mem_ctx, &parms->ctemp.out.name, req->in.data, -1, STR_TERMINATE | STR_ASCII);
break;
case RAW_OPEN_SPLOPEN:
SMBCLI_CHECK_WCT(req, 1);
- parms->splopen.file.fnum = SVAL(req->in.vwv, VWV(0));
+ parms->splopen.out.file.fnum = SVAL(req->in.vwv, VWV(0));
break;
case RAW_OPEN_NTCREATEX:
SMBCLI_CHECK_MIN_WCT(req, 34);
parms->ntcreatex.out.oplock_level = CVAL(req->in.vwv, 4);
- parms->ntcreatex.file.fnum = SVAL(req->in.vwv, 5);
+ parms->ntcreatex.out.file.fnum = SVAL(req->in.vwv, 5);
parms->ntcreatex.out.create_action = IVAL(req->in.vwv, 7);
parms->ntcreatex.out.create_time = smbcli_pull_nttime(req->in.vwv, 11);
parms->ntcreatex.out.access_time = smbcli_pull_nttime(req->in.vwv, 19);
@@ -644,7 +644,7 @@ NTSTATUS smb_raw_open_recv(struct smbcli_request *req, TALLOC_CTX *mem_ctx, unio
case RAW_OPEN_OPENX_READX:
SMBCLI_CHECK_MIN_WCT(req, 15);
- parms->openxreadx.file.fnum = SVAL(req->in.vwv, VWV(2));
+ parms->openxreadx.out.file.fnum = SVAL(req->in.vwv, VWV(2));
parms->openxreadx.out.attrib = SVAL(req->in.vwv, VWV(3));
parms->openxreadx.out.write_time = raw_pull_dos_date3(req->transport,
req->in.vwv + VWV(4));
@@ -706,14 +706,14 @@ struct smbcli_request *smb_raw_close_send(struct smbcli_tree *tree, union smb_cl
switch (parms->generic.level) {
case RAW_CLOSE_CLOSE:
SETUP_REQUEST(SMBclose, 3, 0);
- SSVAL(req->out.vwv, VWV(0), parms->close.file.fnum);
+ SSVAL(req->out.vwv, VWV(0), parms->close.in.file.fnum);
raw_push_dos_date3(tree->session->transport,
req->out.vwv, VWV(1), parms->close.in.write_time);
break;
case RAW_CLOSE_SPLCLOSE:
SETUP_REQUEST(SMBsplclose, 3, 0);
- SSVAL(req->out.vwv, VWV(0), parms->splclose.file.fnum);
+ SSVAL(req->out.vwv, VWV(0), parms->splclose.in.file.fnum);
SIVAL(req->out.vwv, VWV(1), 0); /* reserved */
break;
}
@@ -749,14 +749,14 @@ struct smbcli_request *smb_raw_lock_send(struct smbcli_tree *tree, union smb_loc
switch (parms->generic.level) {
case RAW_LOCK_LOCK:
SETUP_REQUEST(SMBlock, 5, 0);
- SSVAL(req->out.vwv, VWV(0), parms->lock.file.fnum);
+ SSVAL(req->out.vwv, VWV(0), parms->lock.in.file.fnum);
SIVAL(req->out.vwv, VWV(1), parms->lock.in.count);
SIVAL(req->out.vwv, VWV(3), parms->lock.in.offset);
break;
case RAW_LOCK_UNLOCK:
SETUP_REQUEST(SMBunlock, 5, 0);
- SSVAL(req->out.vwv, VWV(0), parms->unlock.file.fnum);
+ SSVAL(req->out.vwv, VWV(0), parms->unlock.in.file.fnum);
SIVAL(req->out.vwv, VWV(1), parms->unlock.in.count);
SIVAL(req->out.vwv, VWV(3), parms->unlock.in.offset);
break;
@@ -770,7 +770,7 @@ struct smbcli_request *smb_raw_lock_send(struct smbcli_tree *tree, union smb_loc
SETUP_REQUEST(SMBlockingX, 8, lck_size * lock_count);
SSVAL(req->out.vwv, VWV(0), SMB_CHAIN_NONE);
SSVAL(req->out.vwv, VWV(1), 0);
- SSVAL(req->out.vwv, VWV(2), parms->lockx.file.fnum);
+ SSVAL(req->out.vwv, VWV(2), parms->lockx.in.file.fnum);
SSVAL(req->out.vwv, VWV(3), parms->lockx.in.mode);
SIVAL(req->out.vwv, VWV(4), parms->lockx.in.timeout);
SSVAL(req->out.vwv, VWV(6), parms->lockx.in.ulock_cnt);
@@ -850,7 +850,7 @@ struct smbcli_request *smb_raw_flush_send(struct smbcli_tree *tree, union smb_fl
struct smbcli_request *req;
SETUP_REQUEST(SMBflush, 1, 0);
- SSVAL(req->out.vwv, VWV(0), parms->flush.file.fnum);
+ SSVAL(req->out.vwv, VWV(0), parms->flush.in.file.fnum);
if (!smbcli_request_send(req)) {
smbcli_request_destroy(req);
@@ -881,7 +881,7 @@ struct smbcli_request *smb_raw_seek_send(struct smbcli_tree *tree,
SETUP_REQUEST(SMBlseek, 4, 0);
- SSVAL(req->out.vwv, VWV(0), parms->lseek.file.fnum);
+ SSVAL(req->out.vwv, VWV(0), parms->lseek.in.file.fnum);
SSVAL(req->out.vwv, VWV(1), parms->lseek.in.mode);
SIVALS(req->out.vwv, VWV(2), parms->lseek.in.offset);
diff --git a/source4/libcli/raw/rawfileinfo.c b/source4/libcli/raw/rawfileinfo.c
index b50a330093..cf8f2f71b4 100644
--- a/source4/libcli/raw/rawfileinfo.c
+++ b/source4/libcli/raw/rawfileinfo.c
@@ -536,7 +536,7 @@ static struct smbcli_request *smb_raw_getattr_send(struct smbcli_tree *tree,
req = smbcli_request_setup(tree, SMBgetatr, 0, 0);
if (!req) return NULL;
- smbcli_req_append_ascii4(req, parms->getattr.file.path, STR_TERMINATE);
+ smbcli_req_append_ascii4(req, parms->getattr.in.file.path, STR_TERMINATE);
if (!smbcli_request_send(req)) {
smbcli_request_destroy(req);
@@ -579,7 +579,7 @@ static struct smbcli_request *smb_raw_getattrE_send(struct smbcli_tree *tree,
req = smbcli_request_setup(tree, SMBgetattrE, 1, 0);
if (!req) return NULL;
- SSVAL(req->out.vwv, VWV(0), parms->getattre.file.fnum);
+ SSVAL(req->out.vwv, VWV(0), parms->getattre.in.file.fnum);
if (!smbcli_request_send(req)) {
smbcli_request_destroy(req);
return NULL;
@@ -647,7 +647,7 @@ struct smbcli_request *smb_raw_fileinfo_send(struct smbcli_tree *tree,
}
req = smb_raw_fileinfo_blob_send(tree,
- parms->generic.file.fnum,
+ parms->generic.in.file.fnum,
parms->generic.level, data);
data_blob_free(&data);
@@ -722,7 +722,7 @@ struct smbcli_request *smb_raw_pathinfo_send(struct smbcli_tree *tree,
}
}
- req = smb_raw_pathinfo_blob_send(tree, parms->generic.file.path,
+ req = smb_raw_pathinfo_blob_send(tree, parms->generic.in.file.path,
parms->generic.level, data);
data_blob_free(&data);
diff --git a/source4/libcli/raw/rawioctl.c b/source4/libcli/raw/rawioctl.c
index 28b58ff2a3..db980a55d6 100644
--- a/source4/libcli/raw/rawioctl.c
+++ b/source4/libcli/raw/rawioctl.c
@@ -37,7 +37,7 @@ static struct smbcli_request *smb_raw_smbioctl_send(struct smbcli_tree *tree,
SETUP_REQUEST(SMBioctl, 3, 0);
- SSVAL(req->out.vwv, VWV(0), parms->ioctl.file.fnum);
+ SSVAL(req->out.vwv, VWV(0), parms->ioctl.in.file.fnum);
SIVAL(req->out.vwv, VWV(1), parms->ioctl.in.request);
if (!smbcli_request_send(req)) {
@@ -81,7 +81,7 @@ static struct smbcli_request *smb_raw_ntioctl_send(struct smbcli_tree *tree,
nt.in.setup_count = 4;
nt.in.setup = setup;
SIVAL(setup, 0, parms->ntioctl.in.function);
- SSVAL(setup, 4, parms->ntioctl.file.fnum);
+ SSVAL(setup, 4, parms->ntioctl.in.file.fnum);
SCVAL(setup, 6, parms->ntioctl.in.fsctl);
SCVAL(setup, 7, parms->ntioctl.in.filter);
nt.in.function = NT_TRANSACT_IOCTL;
diff --git a/source4/libcli/raw/rawnotify.c b/source4/libcli/raw/rawnotify.c
index 3adb1b000b..c06f0a59f7 100644
--- a/source4/libcli/raw/rawnotify.c
+++ b/source4/libcli/raw/rawnotify.c
@@ -36,7 +36,7 @@ struct smbcli_request *smb_raw_changenotify_send(struct smbcli_tree *tree, union
nt.in.setup_count = 4;
nt.in.setup = setup;
SIVAL(setup, 0, parms->notify.in.completion_filter);
- SSVAL(setup, 4, parms->notify.file.fnum);
+ SSVAL(setup, 4, parms->notify.in.file.fnum);
SSVAL(setup, 6, parms->notify.in.recursive);
nt.in.function = NT_TRANSACT_NOTIFY_CHANGE;
nt.in.params = data_blob(NULL, 0);
diff --git a/source4/libcli/raw/rawreadwrite.c b/source4/libcli/raw/rawreadwrite.c
index c4e2ab2498..7f1aaf26d4 100644
--- a/source4/libcli/raw/rawreadwrite.c
+++ b/source4/libcli/raw/rawreadwrite.c
@@ -41,7 +41,7 @@ struct smbcli_request *smb_raw_read_send(struct smbcli_tree *tree, union smb_rea
bigoffset = True;
}
SETUP_REQUEST(SMBreadbraw, bigoffset? 10:8, 0);
- SSVAL(req->out.vwv, VWV(0), parms->readbraw.file.fnum);
+ SSVAL(req->out.vwv, VWV(0), parms->readbraw.in.file.fnum);
SIVAL(req->out.vwv, VWV(1), parms->readbraw.in.offset);
SSVAL(req->out.vwv, VWV(3), parms->readbraw.in.maxcnt);
SSVAL(req->out.vwv, VWV(4), parms->readbraw.in.mincnt);
@@ -54,7 +54,7 @@ struct smbcli_request *smb_raw_read_send(struct smbcli_tree *tree, union smb_rea
case RAW_READ_LOCKREAD:
SETUP_REQUEST(SMBlockread, 5, 0);
- SSVAL(req->out.vwv, VWV(0), parms->lockread.file.fnum);
+ SSVAL(req->out.vwv, VWV(0), parms->lockread.in.file.fnum);
SSVAL(req->out.vwv, VWV(1), parms->lockread.in.count);
SIVAL(req->out.vwv, VWV(2), parms->lockread.in.offset);
SSVAL(req->out.vwv, VWV(4), parms->lockread.in.remaining);
@@ -62,7 +62,7 @@ struct smbcli_request *smb_raw_read_send(struct smbcli_tree *tree, union smb_rea
case RAW_READ_READ:
SETUP_REQUEST(SMBread, 5, 0);
- SSVAL(req->out.vwv, VWV(0), parms->read.file.fnum);
+ SSVAL(req->out.vwv, VWV(0), parms->read.in.file.fnum);
SSVAL(req->out.vwv, VWV(1), parms->read.in.count);
SIVAL(req->out.vwv, VWV(2), parms->read.in.offset);
SSVAL(req->out.vwv, VWV(4), parms->read.in.remaining);
@@ -75,7 +75,7 @@ struct smbcli_request *smb_raw_read_send(struct smbcli_tree *tree, union smb_rea
SETUP_REQUEST(SMBreadX, bigoffset ? 12 : 10, 0);
SSVAL(req->out.vwv, VWV(0), SMB_CHAIN_NONE);
SSVAL(req->out.vwv, VWV(1), 0);
- SSVAL(req->out.vwv, VWV(2), parms->readx.file.fnum);
+ SSVAL(req->out.vwv, VWV(2), parms->readx.in.file.fnum);
SIVAL(req->out.vwv, VWV(3), parms->readx.in.offset);
SSVAL(req->out.vwv, VWV(5), parms->readx.in.maxcnt & 0xFFFF);
SSVAL(req->out.vwv, VWV(6), parms->readx.in.mincnt);
@@ -186,7 +186,7 @@ struct smbcli_request *smb_raw_write_send(struct smbcli_tree *tree, union smb_wr
switch (parms->generic.level) {
case RAW_WRITE_WRITEUNLOCK:
SETUP_REQUEST(SMBwriteunlock, 5, 3 + parms->writeunlock.in.count);
- SSVAL(req->out.vwv, VWV(0), parms->writeunlock.file.fnum);
+ SSVAL(req->out.vwv, VWV(0), parms->writeunlock.in.file.fnum);
SSVAL(req->out.vwv, VWV(1), parms->writeunlock.in.count);
SIVAL(req->out.vwv, VWV(2), parms->writeunlock.in.offset);
SSVAL(req->out.vwv, VWV(4), parms->writeunlock.in.remaining);
@@ -200,7 +200,7 @@ struct smbcli_request *smb_raw_write_send(struct smbcli_tree *tree, union smb_wr
case RAW_WRITE_WRITE:
SETUP_REQUEST(SMBwrite, 5, 3 + parms->write.in.count);
- SSVAL(req->out.vwv, VWV(0), parms->write.file.fnum);
+ SSVAL(req->out.vwv, VWV(0), parms->write.in.file.fnum);
SSVAL(req->out.vwv, VWV(1), parms->write.in.count);
SIVAL(req->out.vwv, VWV(2), parms->write.in.offset);
SSVAL(req->out.vwv, VWV(4), parms->write.in.remaining);
@@ -213,7 +213,7 @@ struct smbcli_request *smb_raw_write_send(struct smbcli_tree *tree, union smb_wr
case RAW_WRITE_WRITECLOSE:
SETUP_REQUEST(SMBwriteclose, 6, 1 + parms->writeclose.in.count);
- SSVAL(req->out.vwv, VWV(0), parms->writeclose.file.fnum);
+ SSVAL(req->out.vwv, VWV(0), parms->writeclose.in.file.fnum);
SSVAL(req->out.vwv, VWV(1), parms->writeclose.in.count);
SIVAL(req->out.vwv, VWV(2), parms->writeclose.in.offset);
raw_push_dos_date3(tree->session->transport,
@@ -232,7 +232,7 @@ struct smbcli_request *smb_raw_write_send(struct smbcli_tree *tree, union smb_wr
SETUP_REQUEST(SMBwriteX, bigoffset ? 14 : 12, parms->writex.in.count);
SSVAL(req->out.vwv, VWV(0), SMB_CHAIN_NONE);
SSVAL(req->out.vwv, VWV(1), 0);
- SSVAL(req->out.vwv, VWV(2), parms->writex.file.fnum);
+ SSVAL(req->out.vwv, VWV(2), parms->writex.in.file.fnum);
SIVAL(req->out.vwv, VWV(3), parms->writex.in.offset);
SIVAL(req->out.vwv, VWV(5), 0); /* reserved */
SSVAL(req->out.vwv, VWV(7), parms->writex.in.wmode);
@@ -250,7 +250,7 @@ struct smbcli_request *smb_raw_write_send(struct smbcli_tree *tree, union smb_wr
case RAW_WRITE_SPLWRITE:
SETUP_REQUEST(SMBsplwr, 1, parms->splwrite.in.count);
- SSVAL(req->out.vwv, VWV(0), parms->splwrite.file.fnum);
+ SSVAL(req->out.vwv, VWV(0), parms->splwrite.in.file.fnum);
if (parms->splwrite.in.count > 0) {
memcpy(req->out.data, parms->splwrite.in.data, parms->splwrite.in.count);
}
diff --git a/source4/libcli/raw/rawsetfileinfo.c b/source4/libcli/raw/rawsetfileinfo.c
index 73fcd82802..46480c636e 100644
--- a/source4/libcli/raw/rawsetfileinfo.c
+++ b/source4/libcli/raw/rawsetfileinfo.c
@@ -283,7 +283,7 @@ static struct smbcli_request *smb_raw_setattr_send(struct smbcli_tree *tree,
raw_push_dos_date3(tree->session->transport,
req->out.vwv, VWV(1), parms->setattr.in.write_time);
memset(req->out.vwv + VWV(3), 0, 10); /* reserved */
- smbcli_req_append_ascii4(req, parms->setattr.file.path, STR_TERMINATE);
+ smbcli_req_append_ascii4(req, parms->setattr.in.file.path, STR_TERMINATE);
smbcli_req_append_ascii4(req, "", STR_TERMINATE);
if (!smbcli_request_send(req)) {
@@ -305,7 +305,7 @@ static struct smbcli_request *smb_raw_setattrE_send(struct smbcli_tree *tree,
req = smbcli_request_setup(tree, SMBsetattrE, 7, 0);
if (!req) return NULL;
- SSVAL(req->out.vwv, VWV(0), parms->setattre.file.fnum);
+ SSVAL(req->out.vwv, VWV(0), parms->setattre.in.file.fnum);
raw_push_dos_date2(tree->session->transport,
req->out.vwv, VWV(1), parms->setattre.in.create_time);
raw_push_dos_date2(tree->session->transport,
@@ -352,7 +352,7 @@ struct smbcli_request *smb_raw_setfileinfo_send(struct smbcli_tree *tree,
/* send request and process the output */
req = smb_raw_setfileinfo_blob_send(tree,
mem_ctx,
- parms->generic.file.fnum,
+ parms->generic.in.file.fnum,
parms->generic.level,
&blob);
@@ -399,7 +399,7 @@ struct smbcli_request *smb_raw_setpathinfo_send(struct smbcli_tree *tree,
/* send request and process the output */
req = smb_raw_setpathinfo_blob_send(tree,
mem_ctx,
- parms->generic.file.path,
+ parms->generic.in.file.path,
parms->generic.level,
&blob);