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

jra at samba.org jra at samba.org
Wed Mar 16 23:32:56 GMT 2005


Author: jra
Date: 2005-03-16 23:32:50 +0000 (Wed, 16 Mar 2005)
New Revision: 5837

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

Log:
Correct fix for OS/2 bug #2335. The error return code in this case is protocol
level dependent.
Jeremy

Modified:
   trunk/source/smbd/trans2.c


Changeset:
Modified: trunk/source/smbd/trans2.c
===================================================================
--- trunk/source/smbd/trans2.c	2005-03-16 23:32:42 UTC (rev 5836)
+++ trunk/source/smbd/trans2.c	2005-03-16 23:32:50 UTC (rev 5837)
@@ -1485,12 +1485,18 @@
 
 	/* 
 	 * If there are no matching entries we must return ERRDOS/ERRbadfile - 
-	 * from observation of NT.
+	 * from observation of NT. NB. This changes to ERRDOS,ERRnofiles if
+	 * the protocol level is less than NT1. Tested with smbclient. JRA.
+	 * This should fix the OS/2 client bug #2335.
 	 */
 
 	if(numentries == 0) {
 		dptr_close(&dptr_num);
-		return ERROR_DOS(ERRDOS,ERRbadfile);
+		if (protocol < PROTOCOL_NT1) {
+			return ERROR_DOS(ERRDOS,ERRnofiles);
+		} else {
+			return ERROR_BOTH(NT_STATUS_NO_SUCH_FILE,ERRDOS,ERRbadfile);
+		}
 	}
 
 	/* At this point pdata points to numentries directory entries. */



More information about the samba-cvs mailing list