Samba 3.6.6 and above return NT_STATUS_FILE_CLOSED rather than STATUS_INVALID_DEVICE_REQUEST

Richard Sharpe realrichardsharpe at gmail.com
Tue Dec 4 15:55:11 MST 2012


On Tue, Dec 4, 2012 at 2:39 PM, Jeremy Allison <jra at samba.org> wrote:
> On Tue, Dec 04, 2012 at 02:32:49PM -0800, Richard Sharpe wrote:
>> Hi folks,
>>
>> I am seeing NT_STATUS_FILE_CLOSED in response to an IOCTL/FSCTL we do
>> not understand. I believe this is an error, and use the following in
>> support of my contention (someone looked at what W2K08 does, but it is
>> an error.)
>>
>> The protocol documents that a non-SMB3-capable (2.002 or 2.1) should
>> respond to VALIDATE_NEGOTIATE_INFO request with a status error of
>> STATUS_INVALID_DEVICE_REQUEST, the same error as for any unsupported
>> FSCTL. Windows Server 2008 (SMB 2.002) and Windows Server 2008 R2 (SMB
>> 2.1) return STATUS_FILE_CLOSED, instead.
>>
>> >From here: http://blogs.msdn.com/b/openspecification/archive/2012/06/28/smb3-secure-dialect-negotiation.aspx
>>
>> The downside is that the Windows client thinks the file is closed and
>> does not explicitly close it leaving an entry in our locking.tdb and
>> causing havoc with MS Office apps.
>
> Hmmm. Hang on a minute. Note here in the document you linked to above:
>
> "The protocol documents that a non-SMB3-capable (2.002 or 2.1) should
> respond to VALIDATE_NEGOTIATE_INFO request with a status error of
> STATUS_INVALID_DEVICE_REQUEST, the same error as for any unsupported
> FSCTL. Windows Server 2008 (SMB 2.002) and Windows Server 2008 R2
> (SMB 2.1) return STATUS_FILE_CLOSED, instead."
>
> So there are some versions of Windows that do return STATUS_FILE_CLOSED.

Yes, it seems so. However, upon re-reading that, I am confused as to
whether they mean that W2K08 returns STATUS_FILE_CLOSED when they get
an unsupported device request or what.

I imagine that very few (perhaps zero) Windows clients ever send an
unsupported IOCTL/FSCTL to W2K08 and it is not license for us to do
the wrong thing :-)

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


More information about the samba-technical mailing list