aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifspdu.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cifs/cifspdu.h')
-rw-r--r--fs/cifs/cifspdu.h89
1 files changed, 78 insertions, 11 deletions
diff --git a/fs/cifs/cifspdu.h b/fs/cifs/cifspdu.h
index 3c09fb9cc569..cc2471094ca5 100644
--- a/fs/cifs/cifspdu.h
+++ b/fs/cifs/cifspdu.h
@@ -528,7 +528,7 @@ typedef union smb_com_session_setup_andx {
528 /* STRING PrimaryDomain */ 528 /* STRING PrimaryDomain */
529 /* STRING NativeOS */ 529 /* STRING NativeOS */
530 /* STRING NativeLanMan */ 530 /* STRING NativeLanMan */
531 } __attribute__((packed)) old_req; /* pre-NTLM (LANMAN2.1) request format */ 531 } __attribute__((packed)) old_req; /* pre-NTLM (LANMAN2.1) req format */
532 532
533 struct { /* default (NTLM) response format */ 533 struct { /* default (NTLM) response format */
534 struct smb_hdr hdr; /* wct = 3 */ 534 struct smb_hdr hdr; /* wct = 3 */
@@ -540,7 +540,7 @@ typedef union smb_com_session_setup_andx {
540 unsigned char NativeOS[1]; /* followed by */ 540 unsigned char NativeOS[1]; /* followed by */
541/* unsigned char * NativeLanMan; */ 541/* unsigned char * NativeLanMan; */
542/* unsigned char * PrimaryDomain; */ 542/* unsigned char * PrimaryDomain; */
543 } __attribute__((packed)) old_resp; /* pre-NTLM (LANMAN2.1) response format */ 543 } __attribute__((packed)) old_resp; /* pre-NTLM (LANMAN2.1) response */
544} __attribute__((packed)) SESSION_SETUP_ANDX; 544} __attribute__((packed)) SESSION_SETUP_ANDX;
545 545
546#define CIFS_NETWORK_OPSYS "CIFS VFS Client for Linux" 546#define CIFS_NETWORK_OPSYS "CIFS VFS Client for Linux"
@@ -1007,10 +1007,49 @@ typedef struct smb_com_setattr_rsp {
1007 1007
1008/* empty wct response to setattr */ 1008/* empty wct response to setattr */
1009 1009
1010/***************************************************/ 1010/*******************************************************/
1011/* NT Transact structure defintions follow */ 1011/* NT Transact structure defintions follow */
1012/* Currently only ioctl and notify are implemented */ 1012/* Currently only ioctl, acl (get security descriptor) */
1013/***************************************************/ 1013/* and notify are implemented */
1014/*******************************************************/
1015typedef struct smb_com_ntransact_req {
1016 struct smb_hdr hdr; /* wct >= 19 */
1017 __u8 MaxSetupCount;
1018 __u16 Reserved;
1019 __le32 TotalParameterCount;
1020 __le32 TotalDataCount;
1021 __le32 MaxParameterCount;
1022 __le32 MaxDataCount;
1023 __le32 ParameterCount;
1024 __le32 ParameterOffset;
1025 __le32 DataCount;
1026 __le32 DataOffset;
1027 __u8 SetupCount; /* four setup words follow subcommand */
1028 /* SNIA spec incorrectly included spurious pad here */
1029 __le16 SubCommand; /* 2 = IOCTL/FSCTL */
1030 /* SetupCount words follow then */
1031 __le16 ByteCount;
1032 __u8 Pad[3];
1033 __u8 Parms[0];
1034} __attribute__((packed)) NTRANSACT_REQ;
1035
1036typedef struct smb_com_ntransact_rsp {
1037 struct smb_hdr hdr; /* wct = 18 */
1038 __u8 Reserved[3];
1039 __le32 TotalParameterCount;
1040 __le32 TotalDataCount;
1041 __le32 ParameterCount;
1042 __le32 ParameterOffset;
1043 __le32 ParameterDisplacement;
1044 __le32 DataCount;
1045 __le32 DataOffset;
1046 __le32 DataDisplacement;
1047 __u8 SetupCount; /* 0 */
1048 __u16 ByteCount;
1049 /* __u8 Pad[3]; */
1050 /* parms and data follow */
1051} __attribute__((packed)) NTRANSACT_RSP;
1052
1014typedef struct smb_com_transaction_ioctl_req { 1053typedef struct smb_com_transaction_ioctl_req {
1015 struct smb_hdr hdr; /* wct = 23 */ 1054 struct smb_hdr hdr; /* wct = 23 */
1016 __u8 MaxSetupCount; 1055 __u8 MaxSetupCount;
@@ -1025,11 +1064,11 @@ typedef struct smb_com_transaction_ioctl_req {
1025 __le32 DataOffset; 1064 __le32 DataOffset;
1026 __u8 SetupCount; /* four setup words follow subcommand */ 1065 __u8 SetupCount; /* four setup words follow subcommand */
1027 /* SNIA spec incorrectly included spurious pad here */ 1066 /* SNIA spec incorrectly included spurious pad here */
1028 __le16 SubCommand;/* 2 = IOCTL/FSCTL */ 1067 __le16 SubCommand; /* 2 = IOCTL/FSCTL */
1029 __le32 FunctionCode; 1068 __le32 FunctionCode;
1030 __u16 Fid; 1069 __u16 Fid;
1031 __u8 IsFsctl; /* 1 = File System Control, 0 = device control (IOCTL)*/ 1070 __u8 IsFsctl; /* 1 = File System Control 0 = device control (IOCTL) */
1032 __u8 IsRootFlag; /* 1 = apply command to root of share (must be DFS share)*/ 1071 __u8 IsRootFlag; /* 1 = apply command to root of share (must be DFS) */
1033 __le16 ByteCount; 1072 __le16 ByteCount;
1034 __u8 Pad[3]; 1073 __u8 Pad[3];
1035 __u8 Data[1]; 1074 __u8 Data[1];
@@ -1049,9 +1088,35 @@ typedef struct smb_com_transaction_ioctl_rsp {
1049 __u8 SetupCount; /* 1 */ 1088 __u8 SetupCount; /* 1 */
1050 __le16 ReturnedDataLen; 1089 __le16 ReturnedDataLen;
1051 __u16 ByteCount; 1090 __u16 ByteCount;
1052 __u8 Pad[3];
1053} __attribute__((packed)) TRANSACT_IOCTL_RSP; 1091} __attribute__((packed)) TRANSACT_IOCTL_RSP;
1054 1092
1093#define CIFS_ACL_OWNER 1
1094#define CIFS_ACL_GROUP 2
1095#define CIFS_ACL_DACL 4
1096#define CIFS_ACL_SACL 8
1097
1098typedef struct smb_com_transaction_qsec_req {
1099 struct smb_hdr hdr; /* wct = 19 */
1100 __u8 MaxSetupCount;
1101 __u16 Reserved;
1102 __le32 TotalParameterCount;
1103 __le32 TotalDataCount;
1104 __le32 MaxParameterCount;
1105 __le32 MaxDataCount;
1106 __le32 ParameterCount;
1107 __le32 ParameterOffset;
1108 __le32 DataCount;
1109 __le32 DataOffset;
1110 __u8 SetupCount; /* no setup words follow subcommand */
1111 /* SNIA spec incorrectly included spurious pad here */
1112 __le16 SubCommand; /* 6 = QUERY_SECURITY_DESC */
1113 __le16 ByteCount; /* bcc = 3 + 8 */
1114 __u8 Pad[3];
1115 __u16 Fid;
1116 __u16 Reserved2;
1117 __le32 AclFlags;
1118} __attribute__((packed)) QUERY_SEC_DESC_REQ;
1119
1055typedef struct smb_com_transaction_change_notify_req { 1120typedef struct smb_com_transaction_change_notify_req {
1056 struct smb_hdr hdr; /* wct = 23 */ 1121 struct smb_hdr hdr; /* wct = 23 */
1057 __u8 MaxSetupCount; 1122 __u8 MaxSetupCount;
@@ -1072,10 +1137,12 @@ typedef struct smb_com_transaction_change_notify_req {
1072 __u8 WatchTree; /* 1 = Monitor subdirectories */ 1137 __u8 WatchTree; /* 1 = Monitor subdirectories */
1073 __u8 Reserved2; 1138 __u8 Reserved2;
1074 __le16 ByteCount; 1139 __le16 ByteCount;
1075/* __u8 Pad[3];*/ 1140/* __u8 Pad[3];*/
1076/* __u8 Data[1];*/ 1141/* __u8 Data[1];*/
1077} __attribute__((packed)) TRANSACT_CHANGE_NOTIFY_REQ; 1142} __attribute__((packed)) TRANSACT_CHANGE_NOTIFY_REQ;
1078 1143
1144/* BB eventually change to use generic ntransact rsp struct
1145 and validation routine */
1079typedef struct smb_com_transaction_change_notify_rsp { 1146typedef struct smb_com_transaction_change_notify_rsp {
1080 struct smb_hdr hdr; /* wct = 18 */ 1147 struct smb_hdr hdr; /* wct = 18 */
1081 __u8 Reserved[3]; 1148 __u8 Reserved[3];