summaryrefslogtreecommitdiff
path: root/source3/libads/ads_status.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2002-09-27 03:05:20 +0000
committerAndrew Bartlett <abartlet@samba.org>2002-09-27 03:05:20 +0000
commit55b6cebbd49be484fb6dcde2f8cb8412bb116276 (patch)
treeb8214a9f6905ff3c3eb10e2e02803a6e098bfce4 /source3/libads/ads_status.c
parentaf8b3466770c7fcf751d9a036ff88a884f516b13 (diff)
downloadsamba-55b6cebbd49be484fb6dcde2f8cb8412bb116276.tar.gz
samba-55b6cebbd49be484fb6dcde2f8cb8412bb116276.tar.bz2
samba-55b6cebbd49be484fb6dcde2f8cb8412bb116276.zip
Some small cleanups to the libads code (mainly error checking), and give a
sane prototype for the push_utf8_allocate code. Andrew Bartlett (This used to be commit ce00a3238ed8a82639c4d0ee3e960f7000b1a7b0)
Diffstat (limited to 'source3/libads/ads_status.c')
-rw-r--r--source3/libads/ads_status.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/libads/ads_status.c b/source3/libads/ads_status.c
index d85f9c9b58..80fdb99eac 100644
--- a/source3/libads/ads_status.c
+++ b/source3/libads/ads_status.c
@@ -72,6 +72,12 @@ NTSTATUS ads_ntstatus(ADS_STATUS status)
if (status.error_type == ADS_ERROR_NT){
return status.err.nt_status;
}
+#ifdef HAVE_LDAP
+ if ((status.error_type == ADS_ERROR_LDAP)
+ && (status.err.rc == LDAP_NO_MEMORY)) {
+ return NT_STATUS_NO_MEMORY;
+ }
+#endif
if (ADS_ERR_OK(status)) return NT_STATUS_OK;
return NT_STATUS_UNSUCCESSFUL;
}