From dbedccc75a0b651c803cb3e4ced375e02377112c Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 26 Jul 2002 21:49:56 +0000 Subject: fix parameters for ldap_set_rebind_proc() from OpenLDAP 2.1 (This used to be commit a6725d4ce95ca8807ccefe4ce033b45d0635da6d) --- source3/passdb/pdb_ldap.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'source3') diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c index 4eed632038..45e71b7a14 100644 --- a/source3/passdb/pdb_ldap.c +++ b/source3/passdb/pdb_ldap.c @@ -309,8 +309,13 @@ static BOOL ldapsam_connect_system(struct ldapsam_privates *ldap_state, LDAP * l DEBUG(10,("ldap_connect_system: Binding to ldap server as \"%s\"\n", ldap_dn)); - - ldap_set_rebind_proc(ldap_struct, (LDAP_REBIND_PROC *)(&rebindproc)); + +#if LDAP_SET_REBIND_PROC_ARGS == 3 + ldap_set_rebind_proc(ldap_struct, (LDAP_REBIND_PROC *)(&rebindproc), NULL); +#elif LDAP_SET_REBIND_PROC_ARGS == 2 + ldap_set_rebind_proc(ldap_struct, (LDAP_REBIND_PROC *)(&rebindproc)); +#endif + rc = ldap_simple_bind_s(ldap_struct, ldap_dn, ldap_secret); -- cgit