[PATCH] Fix bug #10587 - Opening directories on SLES's cifsd and Apple's smbx succeeds.

Jeremy Allison jra at samba.org
Thu May 8 13:06:44 MDT 2014


From the commit message:

----------------------------------------------------------
SLES's cifsd and Apple's smbx do not correctly handle FILE_NON_DIRECTORY_FILE
which prevents recursive copies in gvfs from working correctly since GVFS
tries to open the directory, expecting ENOTDIR, but it suceeds and appears as a
zero byte file.

This fix adds code to the synchronous NTCreateX and NTTrans
open code that checks if CreateOptions was requested with
FILE_NON_DIRECTORY_FILE set, and if the attributes
returned include FILE_ATTRIBUTE_DIRECTORY we synchronously
close the file handle just opened, and return NT_STATUS_FILE_IS_A_DIRECTORY
to the caller.
----------------------------------------------------------

Please review and push if acceptable.

Cheers,

Jeremy.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-s3-libsmbclient-Work-around-bugs-in-SLES-cifsd-and-A.patch
Type: text/x-diff
Size: 6054 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20140508/533d20e8/attachment.patch>


More information about the samba-technical mailing list