From 277a9b4aaca60745acfa3f82bd021390de337a26 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 2 Jul 2010 11:37:50 +1000 Subject: s4-ldb: fixed the parsing of references in the openldap backend We need to use ldap_parse_reference() not ldap_parse_result() --- source4/lib/ldb/ldb_ldap/ldb_ldap.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'source4/lib/ldb/ldb_ldap/ldb_ldap.c') 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; } -- cgit