summaryrefslogtreecommitdiff
path: root/source4/libcli/raw/clitransport.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-07-04 01:23:38 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:19:08 -0500
commite0d521ca79314b7c27512565262f614f67e20e64 (patch)
tree9efe89f626380bb861052fce0e9ac4ccf3287f27 /source4/libcli/raw/clitransport.c
parentb48c1214548a22c989231291221554e3de2d3954 (diff)
downloadsamba-e0d521ca79314b7c27512565262f614f67e20e64.tar.gz
samba-e0d521ca79314b7c27512565262f614f67e20e64.tar.bz2
samba-e0d521ca79314b7c27512565262f614f67e20e64.zip
r8104: - added support for our client library to not negotiate nt status codes, controlled
with 'nt status support' option. - make nt_errstr() display nice strings for dos status codes encoded using NT_STATUS_DOS() - no longer map between dos and nt status codes in the client library, instead return using NT_STATUS_DOS() - fixed the RAW-CONTEXT test to look for NT_STATUS_DOS(ERRSRV, ERRbaduid) instead of NT_STATUS_INVALID_HANDLE (This used to be commit ff5549e87ffae9f062394f30d8fd1ae95b614735)
Diffstat (limited to 'source4/libcli/raw/clitransport.c')
-rw-r--r--source4/libcli/raw/clitransport.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/source4/libcli/raw/clitransport.c b/source4/libcli/raw/clitransport.c
index 999795b81e..51a718b10b 100644
--- a/source4/libcli/raw/clitransport.c
+++ b/source4/libcli/raw/clitransport.c
@@ -476,15 +476,22 @@ static void smbcli_transport_finish_recv(struct smbcli_transport *transport)
req->flags2 = SVAL(req->in.hdr, HDR_FLG2);
if (!(req->flags2 & FLAGS2_32_BIT_ERROR_CODES)) {
- transport->error.etype = ETYPE_DOS;
- transport->error.e.dos.eclass = CVAL(req->in.hdr,HDR_RCLS);
- transport->error.e.dos.ecode = SVAL(req->in.hdr,HDR_ERR);
- req->status = dos_to_ntstatus(transport->error.e.dos.eclass,
- transport->error.e.dos.ecode);
+ int class = CVAL(req->in.hdr,HDR_RCLS);
+ int code = SVAL(req->in.hdr,HDR_ERR);
+ if (class == 0 && code == 0) {
+ transport->error.e.nt_status = NT_STATUS_OK;
+ } else {
+ transport->error.e.nt_status = NT_STATUS_DOS(class, code);
+ }
} else {
- transport->error.etype = ETYPE_NT;
transport->error.e.nt_status = NT_STATUS(IVAL(req->in.hdr, HDR_RCLS));
- req->status = transport->error.e.nt_status;
+ }
+
+ req->status = transport->error.e.nt_status;
+ if (NT_STATUS_IS_OK(req->status)) {
+ transport->error.etype = ETYPE_NONE;
+ } else {
+ transport->error.etype = ETYPE_SMB;
}
if (!smbcli_request_check_sign_mac(req)) {