summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-02-01 17:17:37 +0100
committerVolker Lendecke <vl@samba.org>2009-02-10 21:55:13 +0100
commite3569df15b28896f4f79733df28498da2c021efe (patch)
tree2fee63562b51d1bed45e3a89a5036fd2045b9a8a /source3
parentca23469a906bab690162184e8d3949897f7b5a67 (diff)
downloadsamba-e3569df15b28896f4f79733df28498da2c021efe.tar.gz
samba-e3569df15b28896f4f79733df28498da2c021efe.tar.bz2
samba-e3569df15b28896f4f79733df28498da2c021efe.zip
If we receive a DOS error code, nt_errstr should display it
Diffstat (limited to 'source3')
-rw-r--r--source3/Makefile.in4
-rw-r--r--source3/libsmb/nterr.c5
2 files changed, 7 insertions, 2 deletions
diff --git a/source3/Makefile.in b/source3/Makefile.in
index 6e453c9a86..03463e9cd2 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -423,7 +423,7 @@ LIBNBT_OBJ = ../libcli/nbt/nbtname.o \
LIBNMB_OBJ = libsmb/unexpected.o libsmb/namecache.o libsmb/nmblib.o \
libsmb/namequery.o libsmb/conncache.o libads/dns.o
-NTERR_OBJ = libsmb/nterr.o
+NTERR_OBJ = libsmb/nterr.o libsmb/smberr.o
DOSERR_OBJ = ../libcli/util/doserr.o
ERRORMAP_OBJ = libsmb/errormap.o
DCE_RPC_ERR_OBJ = ../librpc/rpc/dcerpc_error.o
@@ -451,7 +451,7 @@ LIBSMB_OBJ = libsmb/clientgen.o libsmb/cliconnect.o libsmb/clifile.o \
libsmb/clireadwrite.o libsmb/clilist.o libsmb/cliprint.o \
libsmb/clitrans.o libsmb/clisecdesc.o libsmb/clidgram.o \
libsmb/clistr.o libsmb/cliquota.o libsmb/clifsinfo.o libsmb/clidfs.o \
- libsmb/smberr.o libsmb/credentials.o libsmb/pwd_cache.o \
+ libsmb/credentials.o libsmb/pwd_cache.o \
libsmb/clioplock.o libsmb/clirap2.o \
libsmb/smb_seal.o libsmb/async_smb.o \
$(LIBSAMBA_OBJ) \
diff --git a/source3/libsmb/nterr.c b/source3/libsmb/nterr.c
index 465d88a9b6..52e81acbc3 100644
--- a/source3/libsmb/nterr.c
+++ b/source3/libsmb/nterr.c
@@ -659,6 +659,11 @@ const char *nt_errstr(NTSTATUS nt_code)
}
#endif
+ if (NT_STATUS_IS_DOS(nt_code)) {
+ return smb_dos_err_name(NT_STATUS_DOS_CLASS(nt_code),
+ NT_STATUS_DOS_CODE(nt_code));
+ }
+
while (nt_errs[idx].nt_errstr != NULL) {
if (NT_STATUS_EQUAL(nt_errs[idx].nt_errcode, nt_code)) {
return nt_errs[idx].nt_errstr;