s3:libsmb: let cli_pull_raw_error() return NT_STATUS_OK as DOS-Error success
authorStefan Metzmacher <metze@samba.org>
Mon, 12 Sep 2011 07:45:13 +0000 (09:45 +0200)
committerStefan Metzmacher <metze@samba.org>
Mon, 12 Sep 2011 17:12:21 +0000 (19:12 +0200)
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Sep 12 19:12:21 CEST 2011 on sn-devel-104

source3/libsmb/async_smb.c

index 09103321be96e88650c2e2805e008c3e17b1b521..df205dd9d08fb1fd58957f7a5c55b049982ee757 100644 (file)
 static NTSTATUS cli_pull_raw_error(const uint8_t *buf)
 {
        uint32_t flags2 = SVAL(buf, smb_flg2);
+       NTSTATUS status = NT_STATUS(IVAL(buf, smb_rcls));
+
+       if (NT_STATUS_IS_OK(status)) {
+               return NT_STATUS_OK;
+       }
 
        if (flags2 & FLAGS2_32_BIT_ERROR_CODES) {
-               return NT_STATUS(IVAL(buf, smb_rcls));
+               return status;
        }
 
        return NT_STATUS_DOS(CVAL(buf, smb_rcls), SVAL(buf,smb_err));