More for #9374 - Allow smb2.acls torture test to pass against smbd with a POSIX ACLs...
authorJeremy Allison <jra@samba.org>
Wed, 14 Nov 2012 22:40:51 +0000 (14:40 -0800)
committerKarolin Seeger <kseeger@samba.org>
Wed, 21 Nov 2012 07:42:27 +0000 (08:42 +0100)
commit4975257c7b1532c510538f2c6fd07682be28ab53
tree0c197ebb5a11b3ee51670fa931a42cfa9ef3dfe8
parent1187895c71160955b336dba439ab7dd2ef0647ee
More for #9374 - Allow smb2.acls torture test to pass against smbd with a POSIX ACLs backend.

Change can_delete_directory() to can_delete_directory_fsp(), as
we only ever call this from an open directory file handle.

This allows us to use OpenDir_fsp() instead of OpenDir().
OpenDir() re-checks the ACL on the directory, which may
refuse DIR_LIST permissions. OpenDir_fsp() does not. As
this is a file-server internal check to see if the directory
actually contains any files before setting delete on close,
we can ignore the ACL here (Windows does).

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Tue Nov 20 01:46:28 CET 2012 on sn-devel-104
(cherry picked from commit c5ad5029fd87b36426927d57425d5debbb26394c)
source3/include/proto.h
source3/smbd/dir.c
source3/smbd/file_access.c