svn commit: samba r24472 - in branches/SAMBA_3_2_0/source/smbd: .

jra at samba.org jra at samba.org
Wed Aug 15 23:09:40 GMT 2007


Author: jra
Date: 2007-08-15 23:09:39 +0000 (Wed, 15 Aug 2007)
New Revision: 24472

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

Log:
Start fixing up the mapping of OBJECT_NAME_COLLISION
to DOS error ERRDOS, ERRfilexists on open calls.
Jeremy.

Modified:
   branches/SAMBA_3_2_0/source/smbd/trans2.c


Changeset:
Modified: branches/SAMBA_3_2_0/source/smbd/trans2.c
===================================================================
--- branches/SAMBA_3_2_0/source/smbd/trans2.c	2007-08-15 23:09:20 UTC (rev 24471)
+++ branches/SAMBA_3_2_0/source/smbd/trans2.c	2007-08-15 23:09:39 UTC (rev 24472)
@@ -870,12 +870,22 @@
 		open_attr,
 		oplock_request,
 		&smb_action, &fsp);
-      
+
 	if (!NT_STATUS_IS_OK(status)) {
 		if (open_was_deferred(SVAL(inbuf,smb_mid))) {
 			/* 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