diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-07-04 01:23:38 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:19:08 -0500 |
commit | e0d521ca79314b7c27512565262f614f67e20e64 (patch) | |
tree | 9efe89f626380bb861052fce0e9ac4ccf3287f27 /source4/libcli/util/clierror.c | |
parent | b48c1214548a22c989231291221554e3de2d3954 (diff) | |
download | samba-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/util/clierror.c')
-rw-r--r-- | source4/libcli/util/clierror.c | 33 |
1 files changed, 2 insertions, 31 deletions
diff --git a/source4/libcli/util/clierror.c b/source4/libcli/util/clierror.c index 1c82958ce2..52607b1a47 100644 --- a/source4/libcli/util/clierror.c +++ b/source4/libcli/util/clierror.c @@ -29,11 +29,7 @@ const char *smbcli_errstr(struct smbcli_tree *tree) { switch (tree->session->transport->error.etype) { - case ETYPE_DOS: - return dos_errstr( - tree->session->transport->error.e.dos.eclass, - tree->session->transport->error.e.dos.ecode); - case ETYPE_NT: + case ETYPE_SMB: return nt_errstr(tree->session->transport->error.e.nt_status); case ETYPE_SOCKET: @@ -53,13 +49,9 @@ const char *smbcli_errstr(struct smbcli_tree *tree) NTSTATUS smbcli_nt_error(struct smbcli_tree *tree) { switch (tree->session->transport->error.etype) { - case ETYPE_NT: + case ETYPE_SMB: return tree->session->transport->error.e.nt_status; - case ETYPE_DOS: - return dos_to_ntstatus( - tree->session->transport->error.e.dos.eclass, - tree->session->transport->error.e.dos.ecode); case ETYPE_SOCKET: return NT_STATUS_UNSUCCESSFUL; @@ -74,29 +66,8 @@ NTSTATUS smbcli_nt_error(struct smbcli_tree *tree) } -/* Return the DOS error from the last packet - an error class and an error - code. */ -void smbcli_dos_error(struct smbcli_state *cli, uint8_t *eclass, uint32_t *ecode) -{ - if (cli->transport->error.etype == ETYPE_DOS) { - ntstatus_to_dos(cli->transport->error.e.nt_status, - eclass, ecode); - return; - } - - if (eclass) *eclass = cli->transport->error.e.dos.eclass; - if (ecode) *ecode = cli->transport->error.e.dos.ecode; -} - - /* Return true if the last packet was an error */ BOOL smbcli_is_error(struct smbcli_tree *tree) { return NT_STATUS_IS_ERR(smbcli_nt_error(tree)); } - -/* Return true if the last error was a DOS error */ -BOOL smbcli_is_dos_error(struct smbcli_tree *tree) -{ - return tree->session->transport->error.etype == ETYPE_DOS; -} |