hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/fs/cifs/cifspdu.h
....@@ -147,6 +147,11 @@
147147 */
148148 #define SMB3_SIGN_KEY_SIZE (16)
149149
150
+/*
151
+ * Size of the smb3 encryption/decryption keys
152
+ */
153
+#define SMB3_ENC_DEC_KEY_SIZE (32)
154
+
150155 #define CIFS_CLIENT_CHALLENGE_SIZE (8)
151156 #define CIFS_SERVER_CHALLENGE_SIZE (8)
152157 #define CIFS_HMAC_MD5_HASH_SIZE (16)
....@@ -1021,7 +1026,7 @@
10211026 __le16 ByteCount;
10221027 __u8 Pad; /* BB check for whether padded to DWORD
10231028 boundary and optimum performance here */
1024
- char Data[0];
1029
+ char Data[];
10251030 } __attribute__((packed)) WRITEX_REQ;
10261031
10271032 typedef struct smb_com_write_req {
....@@ -1041,7 +1046,7 @@
10411046 __le16 ByteCount;
10421047 __u8 Pad; /* BB check for whether padded to DWORD
10431048 boundary and optimum performance here */
1044
- char Data[0];
1049
+ char Data[];
10451050 } __attribute__((packed)) WRITE_REQ;
10461051
10471052 typedef struct smb_com_write_rsp {
....@@ -1306,7 +1311,7 @@
13061311 /* SetupCount words follow then */
13071312 __le16 ByteCount;
13081313 __u8 Pad[3];
1309
- __u8 Parms[0];
1314
+ __u8 Parms[];
13101315 } __attribute__((packed)) NTRANSACT_REQ;
13111316
13121317 typedef struct smb_com_ntransact_rsp {
....@@ -1523,7 +1528,7 @@
15231528 __le32 NextEntryOffset;
15241529 __le32 Action;
15251530 __le32 FileNameLength;
1526
- __u8 FileName[0];
1531
+ __u8 FileName[];
15271532 } __attribute__((packed));
15281533
15291534 /* For IO_REPARSE_TAG_SYMLINK */
....@@ -1536,8 +1541,11 @@
15361541 __le16 PrintNameOffset;
15371542 __le16 PrintNameLength;
15381543 __le32 Flags;
1539
- char PathBuffer[0];
1544
+ char PathBuffer[];
15401545 } __attribute__((packed));
1546
+
1547
+/* Flag above */
1548
+#define SYMLINK_FLAG_RELATIVE 0x00000001
15411549
15421550 /* For IO_REPARSE_TAG_NFS */
15431551 #define NFS_SPECFILE_LNK 0x00000000014B4E4C
....@@ -1550,7 +1558,7 @@
15501558 __le16 ReparseDataLength;
15511559 __u16 Reserved;
15521560 __le64 InodeType; /* LNK, FIFO, CHR etc. */
1553
- char PathBuffer[0];
1561
+ char PathBuffer[];
15541562 } __attribute__((packed));
15551563
15561564 struct cifs_quota_data {
....@@ -1688,6 +1696,7 @@
16881696 #define SMB_FIND_FILE_ID_FULL_DIR_INFO 0x105
16891697 #define SMB_FIND_FILE_ID_BOTH_DIR_INFO 0x106
16901698 #define SMB_FIND_FILE_UNIX 0x202
1699
+#define SMB_FIND_FILE_POSIX_INFO 0x064
16911700
16921701 typedef struct smb_com_transaction2_qpi_req {
16931702 struct smb_hdr hdr; /* wct = 14+ */
....@@ -1758,7 +1767,7 @@
17581767 __le32 overwrite; /* 1 = overwrite dest */
17591768 __u32 root_fid; /* zero */
17601769 __le32 target_name_len;
1761
- char target_name[0]; /* Must be unicode */
1770
+ char target_name[]; /* Must be unicode */
17621771 } __attribute__((packed));
17631772
17641773 struct smb_com_transaction2_sfi_req {
....@@ -2447,7 +2456,7 @@
24472456 __le16 version;
24482457 __le16 access_entry_count; /* access ACL - count of entries */
24492458 __le16 default_entry_count; /* default ACL - count of entries */
2450
- struct cifs_posix_ace ace_array[0];
2459
+ struct cifs_posix_ace ace_array[];
24512460 /* followed by
24522461 struct cifs_posix_ace default_ace_arraay[] */
24532462 } __attribute__((packed)); /* level 0x204 */
....@@ -2753,7 +2762,7 @@
27532762 /* BB do we need another field for flags? BB */
27542763 __u32 xattr_name_len;
27552764 __u32 xattr_value_len;
2756
- char xattr_name[0];
2765
+ char xattr_name[];
27572766 /* followed by xattr_value[xattr_value_len], no pad */
27582767 } __attribute__((packed)) FILE_XATTR_INFO; /* extended attribute info
27592768 level 0x205 */