svn commit: samba r16762 - in trunk/source/smbd: .

jra at samba.org jra at samba.org
Sun Jul 2 21:24:01 GMT 2006


Author: jra
Date: 2006-07-02 21:24:00 +0000 (Sun, 02 Jul 2006)
New Revision: 16762

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

Log:
Add in code to make us pass Samba4 RAW-SAMBA3BADPATH
test - need to tweak the error code return for DOS
error codes.
Jeremy.

Modified:
   trunk/source/smbd/reply.c


Changeset:
Modified: trunk/source/smbd/reply.c
===================================================================
--- trunk/source/smbd/reply.c	2006-07-02 21:05:19 UTC (rev 16761)
+++ trunk/source/smbd/reply.c	2006-07-02 21:24:00 UTC (rev 16762)
@@ -427,6 +427,15 @@
 	} else {
 		*err = check_path_syntax_wcard(dest, tmppath, contains_wcard);
 	}
+
+	/* Strange DOS error code semantics... */
+	if (!(SVAL(inbuf,smb_flg2) & FLAGS2_32_BIT_ERROR_CODES)) {
+		if (NT_STATUS_EQUAL(NT_STATUS_OBJECT_NAME_INVALID,*err)) {
+			/* We need to map to ERRbadpath */
+			*err = NT_STATUS_OBJECT_PATH_NOT_FOUND;
+		}
+	}
+
 	return ret;
 }
 
@@ -453,6 +462,15 @@
 	} else {
 		*err = check_path_syntax(dest, tmppath);
 	}
+
+	/* Strange DOS error code semantics... */
+	if (!(SVAL(inbuf,smb_flg2) & FLAGS2_32_BIT_ERROR_CODES)) {
+		if (NT_STATUS_EQUAL(NT_STATUS_OBJECT_NAME_INVALID,*err)) {
+			/* We need to map to ERRbadpath */
+			*err = NT_STATUS_OBJECT_PATH_NOT_FOUND;
+		}
+	}
+
 	return ret;
 }
 



More information about the samba-cvs mailing list