summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2013-06-12 10:07:22 +0200
committerAndrew Bartlett <abartlet@samba.org>2013-06-12 13:46:57 +0200
commit7bad9d1fcd7ad78d060d95953ee6aaff5339bba6 (patch)
treef82e25eb6cff1248a56bffa8035d75446dc5c932 /source3
parentee156ef23511713a29095f4ab5d7750a36ba850c (diff)
downloadsamba-7bad9d1fcd7ad78d060d95953ee6aaff5339bba6.tar.gz
samba-7bad9d1fcd7ad78d060d95953ee6aaff5339bba6.tar.bz2
samba-7bad9d1fcd7ad78d060d95953ee6aaff5339bba6.zip
s3-libads: Print the debug string of a failed call with LDAP_OTHER.
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Wed Jun 12 13:46:57 CEST 2013 on sn-devel-104
Diffstat (limited to 'source3')
-rw-r--r--source3/libads/ldap.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c
index 2a4a83b34a..c8ef5b5774 100644
--- a/source3/libads/ldap.c
+++ b/source3/libads/ldap.c
@@ -1041,6 +1041,24 @@ static ADS_STATUS ads_do_paged_search_args(ADS_STRUCT *ads,
if (rc) {
DEBUG(3,("ads_do_paged_search_args: ldap_search_with_timeout(%s) -> %s\n", expr,
ldap_err2string(rc)));
+ if (rc == LDAP_OTHER) {
+ char *ldap_errmsg;
+ int ret;
+
+ ret = ldap_parse_result(ads->ldap.ld,
+ *res,
+ NULL,
+ NULL,
+ &ldap_errmsg,
+ NULL,
+ NULL,
+ 0);
+ if (ret == LDAP_SUCCESS) {
+ DEBUG(3, ("ldap_search_with_timeout(%s) "
+ "error: %s\n", expr, ldap_errmsg));
+ ldap_memfree(ldap_errmsg);
+ }
+ }
goto done;
}