Author: jra
Date: 2007-05-24 01:57:02 +0000 (Thu, 24 May 2007)
New Revision: 23107

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23107

Log:
Fix renames on file descriptors that are supposed to overwrite the
target. Needs merging for 3.0.25a (sorry).
Jeremy.

Modified:
   branches/SAMBA_3_0/source/smbd/reply.c
   branches/SAMBA_3_0_25/source/smbd/reply.c
   branches/SAMBA_3_0_26/source/smbd/reply.c


Changeset:
Modified: branches/SAMBA_3_0/source/smbd/reply.c
===================================================================
--- branches/SAMBA_3_0/source/smbd/reply.c      2007-05-24 00:13:24 UTC (rev 
23106)
+++ branches/SAMBA_3_0/source/smbd/reply.c      2007-05-24 01:57:02 UTC (rev 
23107)
@@ -4245,9 +4245,10 @@
        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;
        }
 

Modified: branches/SAMBA_3_0_25/source/smbd/reply.c
===================================================================
--- branches/SAMBA_3_0_25/source/smbd/reply.c   2007-05-24 00:13:24 UTC (rev 
23106)
+++ branches/SAMBA_3_0_25/source/smbd/reply.c   2007-05-24 01:57:02 UTC (rev 
23107)
@@ -4195,9 +4195,10 @@
        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;
        }
 

Modified: branches/SAMBA_3_0_26/source/smbd/reply.c
===================================================================
--- branches/SAMBA_3_0_26/source/smbd/reply.c   2007-05-24 00:13:24 UTC (rev 
23106)
+++ branches/SAMBA_3_0_26/source/smbd/reply.c   2007-05-24 01:57:02 UTC (rev 
23107)
@@ -4243,9 +4243,10 @@
        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;
        }
 

Reply via email to