From c32553666b096b6c97cea633c29334761acadb21 Mon Sep 17 00:00:00 2001 From: Uri Simchoni Date: Thu, 25 Feb 2016 07:08:06 +0200 Subject: [PATCH] smbd: ignore SVHDX create context According to discussions with dochelp@microsoft.com, an SMB server should ignore an SVHDX_OPEN_DEVICE_CONTEXT or SVHDX_OPEN_DEVICE_CONTEXT_V2 create context if it does not support the RSVD protocol. This is contrary to [MS-SMB2] rev 48.0 which states (3.3.5.9.14) that the open should fail in this case. Failing the create fails Windows backup if the SMB dialect is SMB3.0.2 or higher. Hopefully a new revision of MS-SMB2 will clear this up in the future. Meanwhile, this patch modifies smbd to ignore the SVHDX_OPEN_DEVICE_CONTEXT by default. This can be overriden by a VFS module if a VFS module adds support for RSVD. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11753 Signed-off-by: Uri Simchoni Reviewed-by: Jeremy Allison Reviewed-by: Richard Sharpe (cherry picked from commit c11ad90a240a7703e04d290f78c15839ba31d733) --- source3/modules/vfs_default.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c index 2eb9a17..6a0872c 100644 --- a/source3/modules/vfs_default.c +++ b/source3/modules/vfs_default.c @@ -567,22 +567,6 @@ static NTSTATUS vfswrap_create_file(vfs_handle_struct *handle, const struct smb2_create_blobs *in_context_blobs, struct smb2_create_blobs *out_context_blobs) { - struct smb2_create_blob *svhdx = NULL; - - /* - * It might be empty ... and smb2_create_blob_find does not handle that - */ - if (in_context_blobs) { - svhdx = smb2_create_blob_find(in_context_blobs, - SVHDX_OPEN_DEVICE_CONTEXT); - } - - if (svhdx != NULL) { - /* SharedVHD is not yet supported */ - DEBUG(10, ("Shared VHD not yet supported, INVALID_DEVICE_REQUEST\n")); - return NT_STATUS_INVALID_DEVICE_REQUEST; - } - return create_file_default(handle->conn, req, root_dir_fid, smb_fname, access_mask, share_access, create_disposition, create_options, -- 2.5.0