Windows 2012 Server Backup failure with SMB >= 2.1 (FSCTL_LMR_REQUEST_RESILIENCY)

Jones jones.kstw at gmail.com
Fri Nov 15 03:45:19 MST 2013


>
> I would like to try return NT_STATUS_NOT_SUPPORTED instead of
>  NT_STATUS_INVALID_DEVICE_REQUEST,
> report this result later.
>
>
Hi metze,

After use NT_STATUS_NOT_SUPPORTED instead of
NT_STATUS_INVALID_DEVICE_REQUEST,
Windows Server Backup remain failure.

Through wireshark this modified part could be confirmed,
If Windows Server 2012 issue this ioctl with CtlCode ==
FSCTL_LMR_REQUEST_RESILIENCY,
Samba-4.0.5 would response with NT_STATUS_NOT_SUPPORTED as expected.

Due to only 3 lines are inserted into smb2_ioctl_network_fs.c.
Here is an another question, is required to modified more code?
Thanks for any suggestion.


(A) Code modified
===========================
Modified file: samba-4.0.5/source3/smbd/smb2_ioctl_network_fs.c
... ...
struct tevent_req *smb2_ioctl_network_fs(uint32_t ctl_code,
                                         struct tevent_context *ev,
                                         struct tevent_req *req,
                                         struct smbd_smb2_ioctl_state
*state)
{
... ...
                if (NT_STATUS_EQUAL(status, NT_STATUS_NOT_SUPPORTED)) {
                        if (IS_IPC(state->smbreq->conn)) {
                                status = NT_STATUS_FS_DRIVER_REQUIRED;
                        } else {
#if 1 /* Manually modified. */
                                if (ctl_code == FSCTL_LMR_REQ_RESILIENCY) {
                                        status = NT_STATUS_NOT_SUPPORTED;
                                } else
#endif /* Manually modified. */
                                status = NT_STATUS_INVALID_DEVICE_REQUEST;
                        }
                }
... ...

(B) log-level-10 log.smbd
===========================
0x001401d4 == FSCTL_LMR_REQ_RESILIENCY
And the log messages show

(B.1) Original
[2013/11/15 17:44:08.093974, 10, pid=12207, effective(65534, 65534),
real(65534, 0)] ../source3/smbd/smb2_ioctl.c:394(smbd_smb2_ioctl_send)
  smbd_smb2_ioctl: ctl_code[0x001401d4] WindowsImageBackup/Jones-PC/Backup
2013-11-15 094347/3a0ac6aa-f10f-11e2-93e7-806e6f6e6963.vhdx, fnum 956021602
[2013/11/15 17:44:08.094021, 10, pid=12207, effective(65534, 65534),
real(65534, 0)]
../source3/smbd/smb2_ioctl.c:291(smbd_smb2_request_ioctl_done)
  smbd_smb2_request_ioctl_done: smbd_smb2_ioctl_recv returned 0 status
NT_STATUS_INVALID_DEVICE_REQUEST

(B.2) Modified
[2013/11/15 18:17:38.375447, 10, pid=20209, effective(65534, 65534),
real(65534, 0)] ../source3/smbd/smb2_ioctl.c:394(smbd_smb2_ioctl_send)
  smbd_smb2_ioctl: ctl_code[0x001401d4] WindowsImageBackup/Jones-PC/Backup
2013-11-15 101718/3a0ac6aa-f10f-11e2-93e7-806e6f6e6963.vhdx, fnum 2564351118
[2013/11/15 18:17:38.375494, 10, pid=20209, effective(65534, 65534),
real(65534, 0)]
../source3/smbd/smb2_ioctl.c:291(smbd_smb2_request_ioctl_done)
  smbd_smb2_request_ioctl_done: smbd_smb2_ioctl_recv returned 0 status
NT_STATUS_NOT_SUPPORTED

(C) Download log.smbd and pcap file
===========================
(C.1) Original
samba-4.0.5-original-NT_STATUS_INVALID_DEVICE_REQUEST.pcap
https://drive.google.com/file/d/0B3gmHkfiqqWrWEZwZVFPVUxmX3M/edit?usp=sharing
samba-4.0.5-original-NT_STATUS_INVALID_DEVICE_REQUEST-log.smbd
https://drive.google.com/file/d/0B3gmHkfiqqWrZkdndF9RYkQwODg/edit?usp=sharing

(C.2) Modified
samba-4.0.5-modified-NT_STATUS_NOT_SUPPORTED.pcap
https://drive.google.com/file/d/0B3gmHkfiqqWrQXZDeTRKa1NSNWM/edit?usp=sharing
samba-4.0.5-modified-NT_STATUS_NOT_SUPPORTED-log.smbd
https://drive.google.com/file/d/0B3gmHkfiqqWrVGJpV2dSZW41NGs/edit?usp=sharing


Regards,
Jones


More information about the samba-technical mailing list