diff options
author | Jeremy Allison <jra@samba.org> | 2009-02-28 13:14:23 -0800 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2009-02-28 13:14:23 -0800 |
commit | 7b9381fb4f0db661a32ab884fb621cb6806ecd32 (patch) | |
tree | 1cc950fb078247abb6e6ead20ca01d4fa87c9c8e /source3/smbd | |
parent | 5686a6d91a2e1669dd9d00ba1faf493b0bb5ee90 (diff) | |
download | samba-7b9381fb4f0db661a32ab884fb621cb6806ecd32.tar.gz samba-7b9381fb4f0db661a32ab884fb621cb6806ecd32.tar.xz samba-7b9381fb4f0db661a32ab884fb621cb6806ecd32.zip |
Fix bug #6082 - smbd_gpfs_getacl failed: Windows client canĀ“t rename or
delete file (directory fix).
Jeremy.
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/open.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c index a42705adb6e..569c2603192 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -2457,6 +2457,25 @@ static NTSTATUS open_directory(connection_struct *conn, fname, access_mask, &access_granted); + + /* Were we trying to do a directory open + * for delete and didn't get DELETE + * access (only) ? Check if the + * directory allows DELETE_CHILD. + * See here: + * http://blogs.msdn.com/oldnewthing/archive/2004/06/04/148426.aspx + * for details. */ + + if ((NT_STATUS_EQUAL(status, NT_STATUS_ACCESS_DENIED) && + (access_mask & DELETE_ACCESS) && + (access_granted == DELETE_ACCESS) && + can_delete_file_in_directory(conn, fname))) { + DEBUG(10,("open_directory: overrode ACCESS_DENIED " + "on directory %s\n", + fname )); + status = NT_STATUS_OK; + } + if (!NT_STATUS_IS_OK(status)) { DEBUG(10, ("open_directory: check_open_rights on " "file %s failed with %s\n", |