r23910: We used to deny renames on the
authorJeremy Allison <jra@samba.org>
Tue, 17 Jul 2007 02:17:23 +0000 (02:17 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:28:41 +0000 (12:28 -0500)
source open for non-delete open.
Turns out this is not the case.
VL please test but this matches
Windows behaviour. (I'll add a
torture test tomorrow).
Jeremy.

source/smbd/reply.c

index e3ae0ef7f6aa6253490fc61109683d1d93142e8c..2135299df06c9b9c8391a36af30fb086e72477e7 100644 (file)
@@ -1863,6 +1863,12 @@ static NTSTATUS can_rename(connection_struct *conn, files_struct *fsp,
                return NT_STATUS_NO_SUCH_FILE;
        }
 
+#if 0
+       /* We used to deny renames on the
+        * source open for non-delete open.
+        * Turns out this is not the case.
+        * VL please test but this matches
+        * Windows behaviour. JRA. */
        if (S_ISDIR(pst->st_mode)) {
                return NT_STATUS_OK;
        }
@@ -1872,6 +1878,9 @@ static NTSTATUS can_rename(connection_struct *conn, files_struct *fsp,
        }
 
        return NT_STATUS_ACCESS_DENIED;
+#else
+       return NT_STATUS_OK;
+#endif
 }
 
 /*******************************************************************