s3-smbd ntstatus_to_dos() pulls the DOS error codes out internally
authorAndrew Bartlett <abartlet@samba.org>
Wed, 4 May 2011 06:16:13 +0000 (16:16 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 4 May 2011 07:10:45 +0000 (17:10 +1000)
This means we don't need to duplicate that logic here.

Andrew Bartlett

source3/smbd/error.c

index 5ba751647f15b9d1a69f62d2e5b9d1820b96c9c4..2fb4241968d243bcae8c3c44fd8acd8a1e339e07 100644 (file)
@@ -77,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);
                }