summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2002-07-26 21:49:56 +0000
committerGerald Carter <jerry@samba.org>2002-07-26 21:49:56 +0000
commitdbedccc75a0b651c803cb3e4ced375e02377112c (patch)
tree858afd761831e0be534de5b0a6fb07e0a3461ba7
parenta7261163be4fef530e60b0311f40125d6f0337fc (diff)
downloadsamba-dbedccc75a0b651c803cb3e4ced375e02377112c.tar.gz
samba-dbedccc75a0b651c803cb3e4ced375e02377112c.tar.bz2
samba-dbedccc75a0b651c803cb3e4ced375e02377112c.zip
fix parameters for ldap_set_rebind_proc() from OpenLDAP 2.1
(This used to be commit a6725d4ce95ca8807ccefe4ce033b45d0635da6d)
-rw-r--r--source3/passdb/pdb_ldap.c9
1 files changed, 7 insertions, 2 deletions
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);