diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-06-24 16:26:23 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-06-24 16:26:23 +1000 |
commit | 6da26870e0ae5acd6ff49a30ec2f6886b44d095e (patch) | |
tree | 850c71039563c16a5d563c47e7ba2ab645baf198 /source3/smbd/error.c | |
parent | 6925a799d04c6fa59dd2ddef1f5510f9bb7d17d1 (diff) | |
parent | 2610c05b5b95cc7036b3d6dfb894c6cfbdb68483 (diff) | |
download | samba-4.0.0alpha16.tar.gz samba-4.0.0alpha16.tar.xz samba-4.0.0alpha16.zip |
Merge 2610c05b5b95cc7036b3d6dfb894c6cfbdb68483 as Samba-4.0alpha16samba-4.0.0alpha16
Diffstat (limited to 'source3/smbd/error.c')
-rw-r--r-- | source3/smbd/error.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/source3/smbd/error.c b/source3/smbd/error.c index 6655a6fb082..2fb4241968d 100644 --- a/source3/smbd/error.c +++ b/source3/smbd/error.c @@ -21,9 +21,6 @@ #include "smbd/smbd.h" #include "smbd/globals.h" -/* From lib/error.c */ -extern struct unix_error_map unix_dos_nt_errmap[]; - bool use_nt_status(void) { return lp_nt_status_support() && (global_client_caps & CAP_STATUS32); @@ -80,11 +77,10 @@ void error_packet_set(char *outbuf, uint8 eclass, uint32 ecode, NTSTATUS ntstatu smb_fn_name(CVAL(outbuf,smb_com)), nt_errstr(ntstatus))); } else { - /* We're returning a DOS error only. */ - if (NT_STATUS_IS_DOS(ntstatus)) { - eclass = NT_STATUS_DOS_CLASS(ntstatus); - ecode = NT_STATUS_DOS_CODE(ntstatus); - } else if (eclass == 0 && NT_STATUS_V(ntstatus)) { + /* We're returning a DOS error only, + * nt_status_to_dos() pulls DOS error codes out of the + * NTSTATUS */ + if (NT_STATUS_IS_DOS(ntstatus) || (eclass == 0 && NT_STATUS_V(ntstatus))) { ntstatus_to_dos(ntstatus, &eclass, &ecode); } |