]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
r5497: Fix for DIR1 failures in build farm. It struck me that we
authorJeremy Allison <jra@samba.org>
Tue, 22 Feb 2005 05:11:37 +0000 (05:11 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 15:55:43 +0000 (10:55 -0500)
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.

source/smbd/nttrans.c

index ea155a8edb1ffeffb89b3e5b3f075204e64c5177..53fee175afd241bbe6eec5351df82860b2ac5d31 100644 (file)
@@ -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);