smbd: ignore SVHDX create context
authorUri Simchoni <uri@samba.org>
Thu, 25 Feb 2016 05:08:06 +0000 (07:08 +0200)
committerJeremy Allison <jra@samba.org>
Thu, 25 Feb 2016 21:06:27 +0000 (22:06 +0100)
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 <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
source3/modules/vfs_default.c

index c3ff1bcc103abc4cda4205099eb5d92b52747528..b13b5173bb39058db8e18ef76fde62699d522269 100644 (file)
@@ -571,22 +571,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,