1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-04 17:47:26 +03:00
Jeremy Allison b2ce2441a3 s3: libsmbclient: Work around bugs in SLES cifsd and Apple smbx SMB1 servers.
SLES's cifsd and Apple's smbx do not correctly handle FILE_NON_DIRECTORY_FILE
which prevents recursive copies in gvfs from working correctly [1] 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 cli_open() 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.

Depends on the previous API update to cli_ntcreate()
to add returned attributes.

Fixes bug #10587 - Opening directories on SLES's cifsd and Apple's smbx succeeds.

https://bugzilla.samba.org/show_bug.cgi?id=10587

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-05-09 23:10:07 +02:00
..
2014-01-03 05:04:44 +01:00
2014-01-07 18:52:42 +01:00
2012-05-08 16:46:36 +02:00
2014-05-08 11:32:44 +02:00
2014-05-02 23:47:38 +02:00
2013-05-18 16:32:38 +02:00
2014-05-06 20:37:16 +02:00