summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorJim McDonough <jmcd@samba.org>2010-08-19 08:46:59 -0400
committerJim McDonough <jmcd@samba.org>2010-08-19 15:49:31 -0400
commit0ec0095d1a40435042b8ff9e4bc7fedbeb371e5f (patch)
tree42847d1f8728599af580659e16c28087dc8ad123 /source3/libsmb
parentcbe9f879afc7b212c1e105fcb54b4563d5f6dfe0 (diff)
downloadsamba-0ec0095d1a40435042b8ff9e4bc7fedbeb371e5f.tar.gz
samba-0ec0095d1a40435042b8ff9e4bc7fedbeb371e5f.tar.bz2
samba-0ec0095d1a40435042b8ff9e4bc7fedbeb371e5f.zip
s3-libsmbclient Convert dos error codes to NTstatus in async libsmbclient.
DOS error codes were being lost with the conversion to async libsmbclient. If we're passing around NTSTATUS internally, let's just convert it when we get it. DOS ACCESS_DENIED on nautilus was not prompting for other credentials, because it was not being mapped.
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/async_smb.c8
-rw-r--r--source3/libsmb/errormap.c2
2 files changed, 2 insertions, 8 deletions
diff --git a/source3/libsmb/async_smb.c b/source3/libsmb/async_smb.c
index 4518518a43..8e08d6fc40 100644
--- a/source3/libsmb/async_smb.c
+++ b/source3/libsmb/async_smb.c
@@ -120,13 +120,7 @@ NTSTATUS cli_pull_error(char *buf)
return NT_STATUS(IVAL(buf, smb_rcls));
}
- /* if the client uses dos errors, but there is no error,
- we should return no error here, otherwise it looks
- like an unknown bad NT_STATUS. jmcd */
- if (CVAL(buf, smb_rcls) == 0)
- return NT_STATUS_OK;
-
- return NT_STATUS_DOS(CVAL(buf, smb_rcls), SVAL(buf,smb_err));
+ return dos_to_ntstatus(CVAL(buf, smb_rcls), SVAL(buf,smb_err));
}
/**
diff --git a/source3/libsmb/errormap.c b/source3/libsmb/errormap.c
index 48b3eb32d9..8b4ef23690 100644
--- a/source3/libsmb/errormap.c
+++ b/source3/libsmb/errormap.c
@@ -1425,7 +1425,7 @@ convert a dos eclas/ecode to a NT status32 code
NTSTATUS dos_to_ntstatus(uint8 eclass, uint32 ecode)
{
int i;
- if (eclass == 0 && ecode == 0) return NT_STATUS_OK;
+ if (eclass == 0) return NT_STATUS_OK;
for (i=0; NT_STATUS_V(dos_to_ntstatus_map[i].ntstatus); i++) {
if (eclass == dos_to_ntstatus_map[i].dos_class &&
ecode == dos_to_ntstatus_map[i].dos_code) {