r23113: one more rename-on-an-fd fix from Jeremy
authorGerald Carter <jerry@samba.org>
Thu, 24 May 2007 11:51:58 +0000 (11:51 +0000)
committerGerald Carter <jerry@samba.org>
Thu, 24 May 2007 11:51:58 +0000 (11:51 +0000)
source/smbd/reply.c

index 7fc4f0e1c46be53248fc7845b13464cef5f41d85..6e9aa65ddede77ad161bac6a85d776fca7347e57 100644 (file)
@@ -4195,9 +4195,10 @@ NTSTATUS rename_internals_fsp(connection_struct *conn, files_struct *fsp, pstrin
        ZERO_STRUCT(sbuf);
 
        status = unix_convert(conn, newname, False, newname_last_component, &sbuf);
-       /* We expect this to be NT_STATUS_OBJECT_PATH_NOT_FOUND */
-       if (!NT_STATUS_EQUAL(NT_STATUS_OBJECT_PATH_NOT_FOUND, status)) {
-               return NT_STATUS_OBJECT_NAME_COLLISION;
+
+       /* If an error we expect this to be NT_STATUS_OBJECT_PATH_NOT_FOUND */
+
+       if (!NT_STATUS_IS_OK(status) && !NT_STATUS_EQUAL(NT_STATUS_OBJECT_PATH_NOT_FOUND, status)) {
                return status;
        }