From b48ba00dc67cc7235a135615b0ee25245ac8474b Mon Sep 17 00:00:00 2001 From: Jim McDonough Date: Wed, 13 Aug 2008 18:03:51 -0400 Subject: Prevent NT_STATUS 0xF1000000 errors from appearing when dos errors are used and there is no error. It should be mapped directly to NT_STATUS_OK. smbclient to older servers didn't work. (This used to be commit 78f009b7ef1f1d63b21df9ba6da7fcca01c12109) --- source3/libsmb/async_smb.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source3') diff --git a/source3/libsmb/async_smb.c b/source3/libsmb/async_smb.c index 04c22a9d17..58bba2bfc7 100644 --- a/source3/libsmb/async_smb.c +++ b/source3/libsmb/async_smb.c @@ -31,6 +31,12 @@ NTSTATUS cli_pull_error(char *buf) return NT_STATUS(IVAL(buf, smb_rcls)); } + /* if the client uses dos errors, but there is no error, + we should return no error here, otherwise it looks + like an unknown bad NT_STATUS. jmcd */ + if (CVAL(buf, smb_rcls) == 0) + return NT_STATUS_OK; + return NT_STATUS_DOS(CVAL(buf, smb_rcls), SVAL(buf,smb_err)); } -- cgit