summaryrefslogtreecommitdiff
path: root/source3/smbd/file_access.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2009-02-02 17:10:27 -0800
committerJeremy Allison <jra@samba.org>2009-02-02 17:10:27 -0800
commit553818add80818909268557665e2760a16f2d8a0 (patch)
tree365f056e30195f0e057ea25f7fb18d6b74dce4ba /source3/smbd/file_access.c
parentdf4e38fcc3232da3ed63ebca6f7b9ff7665b1e40 (diff)
downloadsamba-553818add80818909268557665e2760a16f2d8a0.tar.gz
samba-553818add80818909268557665e2760a16f2d8a0.tar.bz2
samba-553818add80818909268557665e2760a16f2d8a0.zip
Fix bug #6082 - smbd_gpfs_getacl failed: Windows client canĀ“t rename or delete file
This fixes the generic rename/delete problem for 3.3.0 and above. Fixed slightly differently to discussions, user viewable modified ACLs are not a good idea :-). Jeremy.
Diffstat (limited to 'source3/smbd/file_access.c')
-rw-r--r--source3/smbd/file_access.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/source3/smbd/file_access.c b/source3/smbd/file_access.c
index d44e63a89a..fe7ba1cc46 100644
--- a/source3/smbd/file_access.c
+++ b/source3/smbd/file_access.c
@@ -113,16 +113,11 @@ bool can_delete_file_in_directory(connection_struct *conn, const char *fname)
* having the DELETE bit on the file itself and second if that does
* not help, by the DELETE_CHILD bit on the containing directory.
*
- * Here we check the other way round because with just posix
- * permissions looking at the file itself will never grant DELETE, so
- * by looking at the directory first we save one get_acl call.
+ * Here we only check the directory permissions, we will
+ * check the file DELETE permission separately.
*/
- if (can_access_file_acl(conn, dname, FILE_DELETE_CHILD)) {
- return true;
- }
-
- return can_access_file_acl(conn, fname, DELETE_ACCESS);
+ return can_access_file_acl(conn, dname, FILE_DELETE_CHILD);
}
/****************************************************************************