summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-07-02 11:37:50 +1000
committerAndrew Tridgell <tridge@samba.org>2010-07-02 12:49:04 +1000
commit277a9b4aaca60745acfa3f82bd021390de337a26 (patch)
tree0471cff697009aea0c0c9e899e655567775dcf4e
parentf9022a1a30dbe57c6b6226c1f3d749b0ba87ce66 (diff)
downloadsamba-277a9b4aaca60745acfa3f82bd021390de337a26.tar.gz
samba-277a9b4aaca60745acfa3f82bd021390de337a26.tar.bz2
samba-277a9b4aaca60745acfa3f82bd021390de337a26.zip
s4-ldb: fixed the parsing of references in the openldap backend
We need to use ldap_parse_reference() not ldap_parse_result()
-rw-r--r--source4/lib/ldb/ldb_ldap/ldb_ldap.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/source4/lib/ldb/ldb_ldap/ldb_ldap.c b/source4/lib/ldb/ldb_ldap/ldb_ldap.c
index 11edd34890..b5a0896854 100644
--- a/source4/lib/ldb/ldb_ldap/ldb_ldap.c
+++ b/source4/lib/ldb/ldb_ldap/ldb_ldap.c
@@ -549,15 +549,16 @@ static bool lldb_parse_result(struct lldb_context *ac, LDAPMessage *result)
case LDAP_RES_SEARCH_REFERENCE:
- if (ldap_parse_result(lldb->ldap, result, &ret,
- &matcheddnp, &errmsgp,
- &referralsp, &serverctrlsp, 0) != LDAP_SUCCESS) {
+ ret = ldap_parse_reference(lldb->ldap, result,
+ &referralsp, &serverctrlsp, 0);
+ if (ret != LDAP_SUCCESS) {
+ ldb_asprintf_errstring(ldb, "ldap reference parse error: %s : %s",
+ ldap_err2string(ret), errmsgp);
ret = LDB_ERR_OPERATIONS_ERROR;
- }
- if (ret != LDB_SUCCESS) {
break;
}
if (referralsp == NULL) {
+ ldb_asprintf_errstring(ldb, "empty ldap referrals list");
ret = LDB_ERR_PROTOCOL_ERROR;
break;
}