]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
r5836: Correct fix for OS/2 bug #2335. The error return code in this case is protocol
authorJeremy Allison <jra@samba.org>
Wed, 16 Mar 2005 23:32:42 +0000 (23:32 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 15:56:04 +0000 (10:56 -0500)
level dependent.
Jeremy.

source/smbd/trans2.c

index e4e1243d68ecec7ea1143fcdbcdf23a4fcaea9c0..7137c4b5f5a81a732ca8e7e86808369becc59989 100644 (file)
@@ -1485,12 +1485,18 @@ close_if_end = %d requires_resume_key = %d level = 0x%x, max_data_bytes = %d\n",
 
        /* 
         * 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. */