1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-09 08:58:35 +03:00

s4-ldb: fixed the parsing of references in the openldap backend

We need to use ldap_parse_reference() not ldap_parse_result()
This commit is contained in:
Andrew Tridgell 2010-07-02 11:37:50 +10:00
parent f9022a1a30
commit 277a9b4aac

View File

@ -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;
}