summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2005-02-22 05:11:37 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:55:43 -0500
commit6baedb3d3f1f4cafb82c4a8d619cb972d5a42382 (patch)
tree1a021a4024fa959f8688742459eadf272488d6a2
parent37ea9da1fdf7eac31bb0d7ced407d49e3f5900bc (diff)
downloadsamba-6baedb3d3f1f4cafb82c4a8d619cb972d5a42382.tar.gz
samba-6baedb3d3f1f4cafb82c4a8d619cb972d5a42382.tar.bz2
samba-6baedb3d3f1f4cafb82c4a8d619cb972d5a42382.zip
r5497: Fix for DIR1 failures in build farm. It struck me that we
only care about failing with ACCESS_DENIED if we can't delete with DELETE access requested. All other errors will be processed as normal. Jeremy. (This used to be commit 360800592c55c9dd8fd787944b3d482f2b9eb951)
-rw-r--r--source3/smbd/nttrans.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index ea155a8edb..53fee175af 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -782,7 +782,9 @@ create_options = 0x%x root_dir_fid = 0x%x\n", flags, desired_access, file_attrib
if (desired_access & DELETE_ACCESS) {
status = can_delete(conn, fname, file_attributes, bad_path, True);
- if (!NT_STATUS_IS_OK(status) && !NT_STATUS_EQUAL(status,NT_STATUS_FILE_IS_A_DIRECTORY)) {
+ /* We're only going to fail here if it's access denied, as that's the
+ only error we care about for "can we delete this ?" questions. */
+ if (!NT_STATUS_IS_OK(status) && NT_STATUS_EQUAL(status,NT_STATUS_ACCESS_DENIED)) {
restore_case_semantics(conn, file_attributes);
END_PROFILE(SMBntcreateX);
return ERROR_NT(status);
@@ -1330,7 +1332,9 @@ static int call_nt_transact_create(connection_struct *conn, char *inbuf, char *o
if (desired_access & DELETE_ACCESS) {
status = can_delete(conn, fname, file_attributes, bad_path, True);
- if (!NT_STATUS_IS_OK(status) && !NT_STATUS_EQUAL(status,NT_STATUS_FILE_IS_A_DIRECTORY)) {
+ /* We're only going to fail here if it's access denied, as that's the
+ only error we care about for "can we delete this ?" questions. */
+ if (!NT_STATUS_IS_OK(status) && NT_STATUS_EQUAL(status,NT_STATUS_ACCESS_DENIED)) {
restore_case_semantics(conn, file_attributes);
END_PROFILE(SMBntcreateX);
return ERROR_NT(status);