File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -388,19 +388,15 @@ put_bcc(__u16 count, struct smb_hdr *hdr)
388388 *
389389 */
390390
391- typedef struct negotiate_req {
392- struct smb_hdr hdr ; /* wct = 0 */
393- __le16 ByteCount ;
394- unsigned char DialectsArray [];
395- } __attribute__((packed )) NEGOTIATE_REQ ;
396-
397391#define MIN_TZ_ADJ (15 * 60) /* minimum grid for timezones in seconds */
398392
399393#define READ_RAW_ENABLE 1
400394#define WRITE_RAW_ENABLE 2
401395#define RAW_ENABLE (READ_RAW_ENABLE | WRITE_RAW_ENABLE)
402396#define SMB1_CLIENT_GUID_SIZE (16)
403- typedef struct negotiate_rsp {
397+
398+ /* See MS-CIFS 2.2.4.52.2 */
399+ typedef struct smb_negotiate_rsp {
404400 struct smb_hdr hdr ; /* wct = 17 */
405401 __le16 DialectIndex ; /* 0xFFFF = no dialect acceptable */
406402 __u8 SecurityMode ;
@@ -426,7 +422,7 @@ typedef struct negotiate_rsp {
426422 unsigned char SecurityBlob [];
427423 } __attribute__((packed )) extended_response ;
428424 } __attribute__((packed )) u ;
429- } __attribute__(( packed )) NEGOTIATE_RSP ;
425+ } __packed SMB_NEGOTIATE_RSP ;
430426
431427/* SecurityMode bits */
432428#define SECMODE_USER 0x01 /* off indicates share level security */
Original file line number Diff line number Diff line change @@ -361,7 +361,7 @@ static int validate_t2(struct smb_t2_rsp *pSMB)
361361}
362362
363363static int
364- decode_ext_sec_blob (struct cifs_ses * ses , NEGOTIATE_RSP * pSMBr )
364+ decode_ext_sec_blob (struct cifs_ses * ses , SMB_NEGOTIATE_RSP * pSMBr )
365365{
366366 int rc = 0 ;
367367 u16 count ;
@@ -419,8 +419,8 @@ CIFSSMBNegotiate(const unsigned int xid,
419419 struct cifs_ses * ses ,
420420 struct TCP_Server_Info * server )
421421{
422- NEGOTIATE_REQ * pSMB ;
423- NEGOTIATE_RSP * pSMBr ;
422+ SMB_NEGOTIATE_REQ * pSMB ;
423+ SMB_NEGOTIATE_RSP * pSMBr ;
424424 int rc = 0 ;
425425 int bytes_returned ;
426426 int i ;
Original file line number Diff line number Diff line change @@ -2151,4 +2151,11 @@ struct smb_hdr {
21512151#define SET_MINIMUM_RIGHTS (FILE_READ_EA | FILE_READ_ATTRIBUTES \
21522152 | READ_CONTROL | SYNCHRONIZE)
21532153
2154+ /* See MS-CIFS 2.2.4.52.1 */
2155+ typedef struct smb_negotiate_req {
2156+ struct smb_hdr hdr ; /* wct = 0 */
2157+ __le16 ByteCount ;
2158+ unsigned char DialectsArray [];
2159+ } __packed SMB_NEGOTIATE_REQ ;
2160+
21542161#endif /* _COMMON_SMB2PDU_H */
Original file line number Diff line number Diff line change 116116#define SMBFLG2_ERR_STATUS cpu_to_le16(0x4000)
117117#define SMBFLG2_UNICODE cpu_to_le16(0x8000)
118118
119- struct smb_negotiate_req {
120- struct smb_hdr hdr ; /* wct = 0 */
121- __le16 ByteCount ;
122- unsigned char DialectsArray [];
123- } __packed ;
124-
119+ /* See MS-CIFS 2.2.4.52.2 */
125120struct smb_negotiate_rsp {
126121 struct smb_hdr hdr ; /* wct = 17 */
127122 __le16 DialectIndex ; /* 0xFFFF = no dialect acceptable */
You can’t perform that action at this time.
0 commit comments