r15794: fixed a problem with DOS status codes - found by kukks (thanks!)
authorAndrew Tridgell <tridge@samba.org>
Mon, 22 May 2006 02:07:11 +0000 (02:07 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:08:21 +0000 (14:08 -0500)
source/libcli/util/errormap.c

index f4feaeffc5e82a1b691ec5b2fad589088620caac..e6a1c0e71c84005fd57a2dff0a2efd9eddd2dcbe 100644 (file)
@@ -1198,6 +1198,11 @@ void ntstatus_to_dos(NTSTATUS ntstatus, uint8_t *eclass, uint32_t *ecode)
                *ecode = 0;
                return;
        }
+       if (NT_STATUS_IS_DOS(ntstatus)) {
+               *eclass = NT_STATUS_DOS_CLASS(ntstatus);
+               *ecode  = NT_STATUS_DOS_CODE(ntstatus);
+               return;
+       }
        for (i=0; NT_STATUS_V(ntstatus_to_dos_map[i].ntstatus); i++) {
                if (NT_STATUS_V(ntstatus) == 
                    NT_STATUS_V(ntstatus_to_dos_map[i].ntstatus)) {