Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'v6.19-rc1-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6

Pull smb client fixes from Steve French:

- important fix for reconnect problem

- minor cleanup

* tag 'v6.19-rc1-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
cifs: update internal module version number
smb: move some SMB1 definitions into common/smb1pdu.h
smb: align durable reconnect v2 context to 8 byte boundary

+61 -45
+2 -2
fs/smb/client/cifsfs.h
··· 145 145 #endif /* CONFIG_CIFS_NFSD_EXPORT */ 146 146 147 147 /* 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" 150 150 #endif /* _CIFSFS_H */
+1 -1
fs/smb/client/cifspdu.h
··· 12 12 #include <net/sock.h> 13 13 #include <linux/unaligned.h> 14 14 #include "../common/smbfsctl.h" 15 - #include "../common/smb2pdu.h" 15 + #include "../common/smb1pdu.h" 16 16 17 17 #define CIFS_PROT 0 18 18 #define POSIX_PROT (CIFS_PROT+1)
+56
fs/smb/common/smb1pdu.h
··· 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 */
+1 -40
fs/smb/common/smb2pdu.h
··· 1293 1293 struct create_context_hdr ccontext; 1294 1294 __u8 Name[8]; 1295 1295 struct durable_reconnect_context_v2 dcontext; 1296 + __u8 Pad[4]; 1296 1297 } __packed; 1297 1298 1298 1299 /* See MS-SMB2 2.2.14.2.12 */ ··· 1986 1985 __le64 LeaseDuration; 1987 1986 } __packed; 1988 1987 1989 - /* 1990 - * See MS-CIFS 2.2.3.1 1991 - * MS-SMB 2.2.3.1 1992 - */ 1993 - struct smb_hdr { 1994 - __u8 Protocol[4]; 1995 - __u8 Command; 1996 - union { 1997 - struct { 1998 - __u8 ErrorClass; 1999 - __u8 Reserved; 2000 - __le16 Error; 2001 - } __packed DosError; 2002 - __le32 CifsError; 2003 - } __packed Status; 2004 - __u8 Flags; 2005 - __le16 Flags2; /* note: le */ 2006 - __le16 PidHigh; 2007 - union { 2008 - struct { 2009 - __le32 SequenceNumber; /* le */ 2010 - __u32 Reserved; /* zero */ 2011 - } __packed Sequence; 2012 - __u8 SecuritySignature[8]; /* le */ 2013 - } __packed Signature; 2014 - __u8 pad[2]; 2015 - __u16 Tid; 2016 - __le16 Pid; 2017 - __u16 Uid; 2018 - __le16 Mid; 2019 - __u8 WordCount; 2020 - } __packed; 2021 - 2022 1988 #define OP_BREAK_STRUCT_SIZE_20 24 2023 1989 #define OP_BREAK_STRUCT_SIZE_21 36 2024 1990 ··· 2089 2121 | WRITE_OWNER | SYNCHRONIZE) 2090 2122 #define SET_MINIMUM_RIGHTS (FILE_READ_EA | FILE_READ_ATTRIBUTES \ 2091 2123 | READ_CONTROL | SYNCHRONIZE) 2092 - 2093 - /* See MS-CIFS 2.2.4.52.1 */ 2094 - typedef struct smb_negotiate_req { 2095 - struct smb_hdr hdr; /* wct = 0 */ 2096 - __le16 ByteCount; 2097 - unsigned char DialectsArray[]; 2098 - } __packed SMB_NEGOTIATE_REQ; 2099 2124 2100 2125 #endif /* _COMMON_SMB2PDU_H */
-2
fs/smb/common/smbglob.h
··· 11 11 #ifndef _COMMON_SMB_GLOB_H 12 12 #define _COMMON_SMB_GLOB_H 13 13 14 - #define SMB1_PROTO_NUMBER cpu_to_le32(0x424d53ff) 15 - 16 14 struct smb_version_values { 17 15 char *version_string; 18 16 __u16 protocol_id;
+1
fs/smb/server/smb_common.h
··· 10 10 11 11 #include "glob.h" 12 12 #include "../common/smbglob.h" 13 + #include "../common/smb1pdu.h" 13 14 #include "../common/smb2pdu.h" 14 15 #include "../common/fscc.h" 15 16 #include "smb2pdu.h"