1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-28 07:21:54 +03:00

Don't return DOS error on SMBsearch return if using NT error codes (NT1

protocol level). Fix for Samba4 tester.
Jeremy.
(This used to be commit 74486ab9ef)
This commit is contained in:
Jeremy Allison 2003-08-19 01:02:41 +00:00
parent c236ac83c8
commit e83a8a40c8

View File

@ -768,21 +768,23 @@ int reply_search(connection_struct *conn, char *inbuf,char *outbuf, int dum_size
SearchEmpty:
if (numentries == 0 || !ok) {
SCVAL(outbuf,smb_rcls,ERRDOS);
SSVAL(outbuf,smb_err,ERRnofiles);
dptr_close(&dptr_num);
}
/* If we were called as SMBffirst with smb_search_id == NULL
and no entries were found then return error and close dirptr
(X/Open spec) */
if(ok && expect_close && numentries == 0 && status_len == 0) {
SCVAL(outbuf,smb_rcls,ERRDOS);
SSVAL(outbuf,smb_err,ERRnofiles);
if (Protocol < PROTOCOL_NT1) {
SCVAL(outbuf,smb_rcls,ERRDOS);
SSVAL(outbuf,smb_err,ERRnofiles);
}
/* Also close the dptr - we know it's gone */
dptr_close(&dptr_num);
} else if (numentries == 0 || !ok) {
if (Protocol < PROTOCOL_NT1) {
SCVAL(outbuf,smb_rcls,ERRDOS);
SSVAL(outbuf,smb_err,ERRnofiles);
}
dptr_close(&dptr_num);
}
/* If we were called as SMBfunique, then we can close the dirptr now ! */