svn commit: samba r24476 - in branches: SAMBA_3_0_25/source/smbd
SAMBA_3_2/source/smbd SAMBA_3_2_0/source/smbd
jra at samba.org
jra at samba.org
Thu Aug 16 00:37:10 GMT 2007
Author: jra
Date: 2007-08-16 00:37:07 +0000 (Thu, 16 Aug 2007)
New Revision: 24476
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=24476
Log:
Fix the mappings in reply_opeXXX calls. Now to test renames.
Jeremy.
Modified:
branches/SAMBA_3_0_25/source/smbd/reply.c
branches/SAMBA_3_2/source/smbd/reply.c
branches/SAMBA_3_2/source/smbd/trans2.c
branches/SAMBA_3_2_0/source/smbd/reply.c
Changeset:
Modified: branches/SAMBA_3_0_25/source/smbd/reply.c
===================================================================
--- branches/SAMBA_3_0_25/source/smbd/reply.c 2007-08-16 00:22:35 UTC (rev 24475)
+++ branches/SAMBA_3_0_25/source/smbd/reply.c 2007-08-16 00:37:07 UTC (rev 24476)
@@ -1321,6 +1321,16 @@
/* We have re-scheduled this call. */
return -1;
}
+ if (NT_STATUS_EQUAL(status, NT_STATUS_OBJECT_NAME_COLLISION)) {
+ /*
+ * We hit an existing file, and if we're returning DOS
+ * error codes OBJECT_NAME_COLLISION would map to
+ * ERRDOS/183, we need to return ERRDOS/80, see bug
+ * 4852.
+ */
+ return ERROR_BOTH(NT_STATUS_OBJECT_NAME_COLLISION,
+ ERRDOS, ERRfilexists);
+ }
return ERROR_NT(status);
}
@@ -1654,6 +1664,16 @@
/* We have re-scheduled this call. */
return -1;
}
+ if (NT_STATUS_EQUAL(status, NT_STATUS_OBJECT_NAME_COLLISION)) {
+ /*
+ * We hit an existing file, and if we're returning DOS
+ * error codes OBJECT_NAME_COLLISION would map to
+ * ERRDOS/183, we need to return ERRDOS/80, see bug
+ * 4852.
+ */
+ return ERROR_BOTH(NT_STATUS_OBJECT_NAME_COLLISION,
+ ERRDOS, ERRfilexists);
+ }
return ERROR_NT(status);
}
@@ -1756,6 +1776,16 @@
/* We have re-scheduled this call. */
return -1;
}
+ if (NT_STATUS_EQUAL(status, NT_STATUS_OBJECT_NAME_COLLISION)) {
+ /*
+ * We hit an existing file, and if we're returning DOS
+ * error codes OBJECT_NAME_COLLISION would map to
+ * ERRDOS/183, we need to return ERRDOS/80, see bug
+ * 4852.
+ */
+ return ERROR_BOTH(NT_STATUS_OBJECT_NAME_COLLISION,
+ ERRDOS, ERRfilexists);
+ }
return ERROR_NT(status);
}
Modified: branches/SAMBA_3_2/source/smbd/reply.c
===================================================================
--- branches/SAMBA_3_2/source/smbd/reply.c 2007-08-16 00:22:35 UTC (rev 24475)
+++ branches/SAMBA_3_2/source/smbd/reply.c 2007-08-16 00:37:07 UTC (rev 24476)
@@ -1551,13 +1551,23 @@
&info, &fsp);
if (!NT_STATUS_IS_OK(status)) {
+ END_PROFILE(SMBopen);
if (open_was_deferred(req->mid)) {
/* We have re-scheduled this call. */
- END_PROFILE(SMBopen);
return;
}
+ if (NT_STATUS_EQUAL(status, NT_STATUS_OBJECT_NAME_COLLISION)) {
+ /*
+ * We hit an existing file, and if we're returning DOS
+ * error codes OBJECT_NAME_COLLISION would map to
+ * ERRDOS/183, we need to return ERRDOS/80, see bug
+ * 4852.
+ */
+ reply_botherror(req, NT_STATUS_OBJECT_NAME_COLLISION,
+ ERRDOS, ERRfilexists);
+ return;
+ }
reply_nterror(req, status);
- END_PROFILE(SMBopen);
return;
}
@@ -1718,7 +1728,6 @@
END_PROFILE(SMBopenX);
if (open_was_deferred(req->mid)) {
/* We have re-scheduled this call. */
- END_PROFILE(SMBopenX);
return;
}
if (NT_STATUS_EQUAL(status, NT_STATUS_OBJECT_NAME_COLLISION)) {
@@ -1730,11 +1739,9 @@
*/
reply_botherror(req, NT_STATUS_OBJECT_NAME_COLLISION,
ERRDOS, ERRfilexists);
- END_PROFILE(SMBopenX);
return;
}
reply_nterror(req, status);
- END_PROFILE(SMBopenX);
return;
}
@@ -2075,13 +2082,23 @@
close(tmpfd);
if (!NT_STATUS_IS_OK(status)) {
+ END_PROFILE(SMBctemp);
if (open_was_deferred(req->mid)) {
/* We have re-scheduled this call. */
- END_PROFILE(SMBctemp);
return;
}
+ if (NT_STATUS_EQUAL(status, NT_STATUS_OBJECT_NAME_COLLISION)) {
+ /*
+ * We hit an existing file, and if we're returning DOS
+ * error codes OBJECT_NAME_COLLISION would map to
+ * ERRDOS/183, we need to return ERRDOS/80, see bug
+ * 4852.
+ */
+ reply_botherror(req, NT_STATUS_OBJECT_NAME_COLLISION,
+ ERRDOS, ERRfilexists);
+ return;
+ }
reply_nterror(req, status);
- END_PROFILE(SMBctemp);
return;
}
Modified: branches/SAMBA_3_2/source/smbd/trans2.c
===================================================================
--- branches/SAMBA_3_2/source/smbd/trans2.c 2007-08-16 00:22:35 UTC (rev 24475)
+++ branches/SAMBA_3_2/source/smbd/trans2.c 2007-08-16 00:37:07 UTC (rev 24476)
@@ -6523,8 +6523,10 @@
* ERRDOS/183, we need to return ERRDOS/80, see bug
* 4852.
*/
- return ERROR_BOTH(NT_STATUS_OBJECT_NAME_COLLISION,
+ reply_botherror(req,
+ NT_STATUS_OBJECT_NAME_COLLISION,
ERRDOS, ERRfilexists);
+ return;
}
reply_nterror(req, status);
Modified: branches/SAMBA_3_2_0/source/smbd/reply.c
===================================================================
--- branches/SAMBA_3_2_0/source/smbd/reply.c 2007-08-16 00:22:35 UTC (rev 24475)
+++ branches/SAMBA_3_2_0/source/smbd/reply.c 2007-08-16 00:37:07 UTC (rev 24476)
@@ -1367,6 +1367,16 @@
/* We have re-scheduled this call. */
return -1;
}
+ if (NT_STATUS_EQUAL(status, NT_STATUS_OBJECT_NAME_COLLISION)) {
+ /*
+ * We hit an existing file, and if we're returning DOS
+ * error codes OBJECT_NAME_COLLISION would map to
+ * ERRDOS/183, we need to return ERRDOS/80, see bug
+ * 4852.
+ */
+ return ERROR_BOTH(NT_STATUS_OBJECT_NAME_COLLISION,
+ ERRDOS, ERRfilexists);
+ }
return ERROR_NT(status);
}
@@ -1708,6 +1718,16 @@
/* We have re-scheduled this call. */
return -1;
}
+ if (NT_STATUS_EQUAL(status, NT_STATUS_OBJECT_NAME_COLLISION)) {
+ /*
+ * We hit an existing file, and if we're returning DOS
+ * error codes OBJECT_NAME_COLLISION would map to
+ * ERRDOS/183, we need to return ERRDOS/80, see bug
+ * 4852.
+ */
+ return ERROR_BOTH(NT_STATUS_OBJECT_NAME_COLLISION,
+ ERRDOS, ERRfilexists);
+ }
return ERROR_NT(status);
}
@@ -1814,6 +1834,16 @@
/* We have re-scheduled this call. */
return -1;
}
+ if (NT_STATUS_EQUAL(status, NT_STATUS_OBJECT_NAME_COLLISION)) {
+ /*
+ * We hit an existing file, and if we're returning DOS
+ * error codes OBJECT_NAME_COLLISION would map to
+ * ERRDOS/183, we need to return ERRDOS/80, see bug
+ * 4852.
+ */
+ return ERROR_BOTH(NT_STATUS_OBJECT_NAME_COLLISION,
+ ERRDOS, ERRfilexists);
+ }
return ERROR_NT(status);
}
More information about the samba-cvs
mailing list