.. | .. |
---|
147 | 147 | */ |
---|
148 | 148 | #define SMB3_SIGN_KEY_SIZE (16) |
---|
149 | 149 | |
---|
| 150 | +/* |
---|
| 151 | + * Size of the smb3 encryption/decryption keys |
---|
| 152 | + */ |
---|
| 153 | +#define SMB3_ENC_DEC_KEY_SIZE (32) |
---|
| 154 | + |
---|
150 | 155 | #define CIFS_CLIENT_CHALLENGE_SIZE (8) |
---|
151 | 156 | #define CIFS_SERVER_CHALLENGE_SIZE (8) |
---|
152 | 157 | #define CIFS_HMAC_MD5_HASH_SIZE (16) |
---|
.. | .. |
---|
1021 | 1026 | __le16 ByteCount; |
---|
1022 | 1027 | __u8 Pad; /* BB check for whether padded to DWORD |
---|
1023 | 1028 | boundary and optimum performance here */ |
---|
1024 | | - char Data[0]; |
---|
| 1029 | + char Data[]; |
---|
1025 | 1030 | } __attribute__((packed)) WRITEX_REQ; |
---|
1026 | 1031 | |
---|
1027 | 1032 | typedef struct smb_com_write_req { |
---|
.. | .. |
---|
1041 | 1046 | __le16 ByteCount; |
---|
1042 | 1047 | __u8 Pad; /* BB check for whether padded to DWORD |
---|
1043 | 1048 | boundary and optimum performance here */ |
---|
1044 | | - char Data[0]; |
---|
| 1049 | + char Data[]; |
---|
1045 | 1050 | } __attribute__((packed)) WRITE_REQ; |
---|
1046 | 1051 | |
---|
1047 | 1052 | typedef struct smb_com_write_rsp { |
---|
.. | .. |
---|
1306 | 1311 | /* SetupCount words follow then */ |
---|
1307 | 1312 | __le16 ByteCount; |
---|
1308 | 1313 | __u8 Pad[3]; |
---|
1309 | | - __u8 Parms[0]; |
---|
| 1314 | + __u8 Parms[]; |
---|
1310 | 1315 | } __attribute__((packed)) NTRANSACT_REQ; |
---|
1311 | 1316 | |
---|
1312 | 1317 | typedef struct smb_com_ntransact_rsp { |
---|
.. | .. |
---|
1523 | 1528 | __le32 NextEntryOffset; |
---|
1524 | 1529 | __le32 Action; |
---|
1525 | 1530 | __le32 FileNameLength; |
---|
1526 | | - __u8 FileName[0]; |
---|
| 1531 | + __u8 FileName[]; |
---|
1527 | 1532 | } __attribute__((packed)); |
---|
1528 | 1533 | |
---|
1529 | 1534 | /* For IO_REPARSE_TAG_SYMLINK */ |
---|
.. | .. |
---|
1536 | 1541 | __le16 PrintNameOffset; |
---|
1537 | 1542 | __le16 PrintNameLength; |
---|
1538 | 1543 | __le32 Flags; |
---|
1539 | | - char PathBuffer[0]; |
---|
| 1544 | + char PathBuffer[]; |
---|
1540 | 1545 | } __attribute__((packed)); |
---|
| 1546 | + |
---|
| 1547 | +/* Flag above */ |
---|
| 1548 | +#define SYMLINK_FLAG_RELATIVE 0x00000001 |
---|
1541 | 1549 | |
---|
1542 | 1550 | /* For IO_REPARSE_TAG_NFS */ |
---|
1543 | 1551 | #define NFS_SPECFILE_LNK 0x00000000014B4E4C |
---|
.. | .. |
---|
1550 | 1558 | __le16 ReparseDataLength; |
---|
1551 | 1559 | __u16 Reserved; |
---|
1552 | 1560 | __le64 InodeType; /* LNK, FIFO, CHR etc. */ |
---|
1553 | | - char PathBuffer[0]; |
---|
| 1561 | + char PathBuffer[]; |
---|
1554 | 1562 | } __attribute__((packed)); |
---|
1555 | 1563 | |
---|
1556 | 1564 | struct cifs_quota_data { |
---|
.. | .. |
---|
1688 | 1696 | #define SMB_FIND_FILE_ID_FULL_DIR_INFO 0x105 |
---|
1689 | 1697 | #define SMB_FIND_FILE_ID_BOTH_DIR_INFO 0x106 |
---|
1690 | 1698 | #define SMB_FIND_FILE_UNIX 0x202 |
---|
| 1699 | +#define SMB_FIND_FILE_POSIX_INFO 0x064 |
---|
1691 | 1700 | |
---|
1692 | 1701 | typedef struct smb_com_transaction2_qpi_req { |
---|
1693 | 1702 | struct smb_hdr hdr; /* wct = 14+ */ |
---|
.. | .. |
---|
1758 | 1767 | __le32 overwrite; /* 1 = overwrite dest */ |
---|
1759 | 1768 | __u32 root_fid; /* zero */ |
---|
1760 | 1769 | __le32 target_name_len; |
---|
1761 | | - char target_name[0]; /* Must be unicode */ |
---|
| 1770 | + char target_name[]; /* Must be unicode */ |
---|
1762 | 1771 | } __attribute__((packed)); |
---|
1763 | 1772 | |
---|
1764 | 1773 | struct smb_com_transaction2_sfi_req { |
---|
.. | .. |
---|
2447 | 2456 | __le16 version; |
---|
2448 | 2457 | __le16 access_entry_count; /* access ACL - count of entries */ |
---|
2449 | 2458 | __le16 default_entry_count; /* default ACL - count of entries */ |
---|
2450 | | - struct cifs_posix_ace ace_array[0]; |
---|
| 2459 | + struct cifs_posix_ace ace_array[]; |
---|
2451 | 2460 | /* followed by |
---|
2452 | 2461 | struct cifs_posix_ace default_ace_arraay[] */ |
---|
2453 | 2462 | } __attribute__((packed)); /* level 0x204 */ |
---|
.. | .. |
---|
2753 | 2762 | /* BB do we need another field for flags? BB */ |
---|
2754 | 2763 | __u32 xattr_name_len; |
---|
2755 | 2764 | __u32 xattr_value_len; |
---|
2756 | | - char xattr_name[0]; |
---|
| 2765 | + char xattr_name[]; |
---|
2757 | 2766 | /* followed by xattr_value[xattr_value_len], no pad */ |
---|
2758 | 2767 | } __attribute__((packed)) FILE_XATTR_INFO; /* extended attribute info |
---|
2759 | 2768 | level 0x205 */ |
---|