summaryrefslogtreecommitdiff
path: root/source3/libads/ldap.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/libads/ldap.c')
-rw-r--r--source3/libads/ldap.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c
index bf402b3499..6d1ca24537 100644
--- a/source3/libads/ldap.c
+++ b/source3/libads/ldap.c
@@ -577,8 +577,10 @@ ADS_STATUS ads_do_search_all(ADS_STRUCT *ads, const char *bind_path,
status = ads_do_paged_search(ads, bind_path, scope, expr, attrs, res,
&count, &cookie);
- if (!ADS_ERR_OK(status)) return status;
+ if (!ADS_ERR_OK(status))
+ return status;
+#ifdef HAVE_LDAP_ADD_RESULT_ENTRY
while (cookie) {
void *res2 = NULL;
ADS_STATUS status2;
@@ -598,6 +600,10 @@ ADS_STATUS ads_do_search_all(ADS_STRUCT *ads, const char *bind_path,
/* note that we do not free res2, as the memory is now
part of the main returned list */
}
+#else
+ DEBUG(0, ("no ldap_add_result_entry() support in LDAP libs!\n"));
+ status = ADS_ERROR_NT(NT_STATUS_UNSUCCESSFUL);
+#endif
return status;
}