About the SMB error codes.

Richard Sharpe realrichardsharpe at gmail.com
Wed May 22 09:06:34 MDT 2013


On Wed, May 22, 2013 at 8:01 AM, Christopher R. Hertel <crh at ubiqx.mn.org> wrote:
> On Wed, May 22, 2013 at 03:56:54AM +0000, Tayade, Nilesh wrote:
> :
> :
> :
>
>> I looked into the MS-CIFS documentation. In my case the
>> STATUS_INVALID_DEVICE_REQUEST error is generated for NT-TRANS request
>> with IOCTL subcommand.
>
>> But in MS-CIFS documentation, the error codes list for NT-TRANS command
>> with IOCTL subcommand doesn't show the STATUS_INVALID_DEVICE_REQUEST
>> error.
>> What's wrong?
>
> The error code is being returned from the IOCTL, not the NT_TRANS.
> You'll have to look at the IOCTL documentation (I don't know where to find
> that) to find out what it means.
>
>> Please refer the attached pcap file with 2 SMB packets. The IOCTL is
>> being performed on some file system resource.
>> And the IOCTL parameters show 'Unknown' function. Could this be the
>> reason of error? Could this happen because of incompatibility of Windows
>> versions?
>
> What is happening is fairy clear.  The client is trying to pass a request
> to a device on the server.  The device is either the wrong type of device
> or not a device at all, so it doesn't understand the request, and is
> returning an error.  (...or the ioctl system on the server is returning
> the error because it has detected that the handle you passed is of the
> wrong type).
>
> In any case, it's not the SMB system that's returning the error.  NT_TRANS
> is just a transport layer.  It is handling off the request and returning
> the error message that it receives.

And, IIRC, INVALID_DEVICE_REQUEST is essentially the device's way of
saying ENOTSUP, at least for Windows.

-- 
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)


More information about the samba-technical mailing list