File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -145,6 +145,6 @@ extern const struct export_operations cifs_export_ops;
145145#endif /* CONFIG_CIFS_NFSD_EXPORT */
146146
147147/* when changing internal version - update following two lines at same time */
148- #define SMB3_PRODUCT_BUILD 57
149- #define CIFS_VERSION "2.57 "
148+ #define SMB3_PRODUCT_BUILD 58
149+ #define CIFS_VERSION "2.58 "
150150#endif /* _CIFSFS_H */
Original file line number Diff line number Diff line change 1212#include <net/sock.h>
1313#include <linux/unaligned.h>
1414#include "../common/smbfsctl.h"
15- #include "../common/smb2pdu .h"
15+ #include "../common/smb1pdu .h"
1616
1717#define CIFS_PROT 0
1818#define POSIX_PROT (CIFS_PROT+1)
Original file line number Diff line number Diff line change 1+ /* SPDX-License-Identifier: LGPL-2.1 */
2+ /*
3+ *
4+ * Copyright (C) International Business Machines Corp., 2002,2009
5+ * 2018 Samsung Electronics Co., Ltd.
6+ * Author(s): Steve French <sfrench@us.ibm.com>
7+ * Namjae Jeon <linkinjeon@kernel.org>
8+ *
9+ */
10+
11+ #ifndef _COMMON_SMB1_PDU_H
12+ #define _COMMON_SMB1_PDU_H
13+
14+ #define SMB1_PROTO_NUMBER cpu_to_le32(0x424d53ff)
15+
16+ /*
17+ * See MS-CIFS 2.2.3.1
18+ * MS-SMB 2.2.3.1
19+ */
20+ struct smb_hdr {
21+ __u8 Protocol [4 ];
22+ __u8 Command ;
23+ union {
24+ struct {
25+ __u8 ErrorClass ;
26+ __u8 Reserved ;
27+ __le16 Error ;
28+ } __packed DosError ;
29+ __le32 CifsError ;
30+ } __packed Status ;
31+ __u8 Flags ;
32+ __le16 Flags2 ; /* note: le */
33+ __le16 PidHigh ;
34+ union {
35+ struct {
36+ __le32 SequenceNumber ; /* le */
37+ __u32 Reserved ; /* zero */
38+ } __packed Sequence ;
39+ __u8 SecuritySignature [8 ]; /* le */
40+ } __packed Signature ;
41+ __u8 pad [2 ];
42+ __u16 Tid ;
43+ __le16 Pid ;
44+ __u16 Uid ;
45+ __le16 Mid ;
46+ __u8 WordCount ;
47+ } __packed ;
48+
49+ /* See MS-CIFS 2.2.4.52.1 */
50+ typedef struct smb_negotiate_req {
51+ struct smb_hdr hdr ; /* wct = 0 */
52+ __le16 ByteCount ;
53+ unsigned char DialectsArray [];
54+ } __packed SMB_NEGOTIATE_REQ ;
55+
56+ #endif /* _COMMON_SMB1_PDU_H */
Original file line number Diff line number Diff line change @@ -1293,6 +1293,7 @@ struct create_durable_handle_reconnect_v2 {
12931293 struct create_context_hdr ccontext ;
12941294 __u8 Name [8 ];
12951295 struct durable_reconnect_context_v2 dcontext ;
1296+ __u8 Pad [4 ];
12961297} __packed ;
12971298
12981299/* See MS-SMB2 2.2.14.2.12 */
@@ -1985,39 +1986,6 @@ struct smb2_lease_ack {
19851986 __le64 LeaseDuration ;
19861987} __packed ;
19871988
1988- /*
1989- * See MS-CIFS 2.2.3.1
1990- * MS-SMB 2.2.3.1
1991- */
1992- struct smb_hdr {
1993- __u8 Protocol [4 ];
1994- __u8 Command ;
1995- union {
1996- struct {
1997- __u8 ErrorClass ;
1998- __u8 Reserved ;
1999- __le16 Error ;
2000- } __packed DosError ;
2001- __le32 CifsError ;
2002- } __packed Status ;
2003- __u8 Flags ;
2004- __le16 Flags2 ; /* note: le */
2005- __le16 PidHigh ;
2006- union {
2007- struct {
2008- __le32 SequenceNumber ; /* le */
2009- __u32 Reserved ; /* zero */
2010- } __packed Sequence ;
2011- __u8 SecuritySignature [8 ]; /* le */
2012- } __packed Signature ;
2013- __u8 pad [2 ];
2014- __u16 Tid ;
2015- __le16 Pid ;
2016- __u16 Uid ;
2017- __le16 Mid ;
2018- __u8 WordCount ;
2019- } __packed ;
2020-
20211989#define OP_BREAK_STRUCT_SIZE_20 24
20221990#define OP_BREAK_STRUCT_SIZE_21 36
20231991
@@ -2122,11 +2090,4 @@ struct smb_hdr {
21222090#define SET_MINIMUM_RIGHTS (FILE_READ_EA | FILE_READ_ATTRIBUTES \
21232091 | READ_CONTROL | SYNCHRONIZE)
21242092
2125- /* See MS-CIFS 2.2.4.52.1 */
2126- typedef struct smb_negotiate_req {
2127- struct smb_hdr hdr ; /* wct = 0 */
2128- __le16 ByteCount ;
2129- unsigned char DialectsArray [];
2130- } __packed SMB_NEGOTIATE_REQ ;
2131-
21322093#endif /* _COMMON_SMB2PDU_H */
Original file line number Diff line number Diff line change 1111#ifndef _COMMON_SMB_GLOB_H
1212#define _COMMON_SMB_GLOB_H
1313
14- #define SMB1_PROTO_NUMBER cpu_to_le32(0x424d53ff)
15-
1614struct smb_version_values {
1715 char * version_string ;
1816 __u16 protocol_id ;
Original file line number Diff line number Diff line change 1010
1111#include "glob.h"
1212#include "../common/smbglob.h"
13+ #include "../common/smb1pdu.h"
1314#include "../common/smb2pdu.h"
1415#include "../common/fscc.h"
1516#include "smb2pdu.h"
You can’t perform that action at this time.
0 commit comments