diff options
author | Jeremy Allison <jra@samba.org> | 2005-03-16 23:32:42 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:56:04 -0500 |
commit | c6e94efcec91d6d64b451fa3da8aeab58dc295b8 (patch) | |
tree | eb0c3cbe1c3e52bda76f8d647d7f30d370b46b7a /source3/smbd | |
parent | 7069d481c0c96edfa552aa74b192f63125416228 (diff) | |
download | samba-c6e94efcec91d6d64b451fa3da8aeab58dc295b8.tar.gz samba-c6e94efcec91d6d64b451fa3da8aeab58dc295b8.tar.bz2 samba-c6e94efcec91d6d64b451fa3da8aeab58dc295b8.zip |
r5836: Correct fix for OS/2 bug #2335. The error return code in this case is protocol
level dependent.
Jeremy.
(This used to be commit 712ef86ac008524866615e670db7659ea674fefb)
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/trans2.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index e4e1243d68..7137c4b5f5 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -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. */ |