[SMB3] Send durable handle v2 contexts when use of persistent handles required
Version 2 of the patch. Thanks to Dan Carpenter and the smatch tool for finding a problem in the first version of this patch. CC: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <steve.french@primarydata.com>
This commit is contained in:
@@ -590,6 +590,44 @@ struct create_durable {
|
||||
} Data;
|
||||
} __packed;
|
||||
|
||||
/* See MS-SMB2 2.2.13.2.11 */
|
||||
/* Flags */
|
||||
#define SMB2_DHANDLE_FLAG_PERSISTENT 0x00000002
|
||||
struct durable_context_v2 {
|
||||
__le32 Timeout;
|
||||
__le32 Flags;
|
||||
__u64 Reserved;
|
||||
__u8 CreateGuid[16];
|
||||
} __packed;
|
||||
|
||||
struct create_durable_v2 {
|
||||
struct create_context ccontext;
|
||||
__u8 Name[8];
|
||||
struct durable_context_v2 dcontext;
|
||||
} __packed;
|
||||
|
||||
/* See MS-SMB2 2.2.13.2.12 */
|
||||
struct durable_reconnect_context_v2 {
|
||||
struct {
|
||||
__u64 PersistentFileId;
|
||||
__u64 VolatileFileId;
|
||||
} Fid;
|
||||
__u8 CreateGuid[16];
|
||||
__le32 Flags; /* see above DHANDLE_FLAG_PERSISTENT */
|
||||
} __packed;
|
||||
|
||||
/* See MS-SMB2 2.2.14.2.12 */
|
||||
struct durable_reconnect_context_v2_rsp {
|
||||
__le32 Timeout;
|
||||
__le32 Flags; /* see above DHANDLE_FLAG_PERSISTENT */
|
||||
} __packed;
|
||||
|
||||
struct create_durable_handle_reconnect_v2 {
|
||||
struct create_context ccontext;
|
||||
__u8 Name[8];
|
||||
struct durable_reconnect_context_v2 dcontext;
|
||||
} __packed;
|
||||
|
||||
#define COPY_CHUNK_RES_KEY_SIZE 24
|
||||
struct resume_key_req {
|
||||
char ResumeKey[COPY_CHUNK_RES_KEY_SIZE];
|
||||
@@ -643,6 +681,13 @@ struct fsctl_get_integrity_information_rsp {
|
||||
/* Integrity flags for above */
|
||||
#define FSCTL_INTEGRITY_FLAG_CHECKSUM_ENFORCEMENT_OFF 0x00000001
|
||||
|
||||
/* See MS-SMB2 2.2.31.3 */
|
||||
struct network_resiliency_req {
|
||||
__le32 Timeout;
|
||||
__le32 Reserved;
|
||||
} __packed;
|
||||
/* There is no buffer for the response ie no struct network_resiliency_rsp */
|
||||
|
||||
|
||||
struct validate_negotiate_info_req {
|
||||
__le32 Capabilities;
|
||||
|
Reference in New Issue
Block a user