summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2009-03-01 05:46:15 +0100
committerJelmer Vernooij <jelmer@samba.org>2009-03-01 05:46:15 +0100
commit79fc0ddaf44af1e31d7e6f2c6f576fd3c05e087d (patch)
treea2caaaad4fab3881887055712fe3433748a62531 /source3
parente6ec32f3acbf626f7cf52fc516f9b496d4e1d6f6 (diff)
parent7b9381fb4f0db661a32ab884fb621cb6806ecd32 (diff)
downloadsamba-79fc0ddaf44af1e31d7e6f2c6f576fd3c05e087d.tar.gz
samba-79fc0ddaf44af1e31d7e6f2c6f576fd3c05e087d.tar.bz2
samba-79fc0ddaf44af1e31d7e6f2c6f576fd3c05e087d.zip
Merge branch 'master' of git://git.samba.org/samba into HEAD
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/open.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index a42705adb6..569c260319 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",