diff options
author | Gerald Carter <jerry@samba.org> | 2002-07-26 21:49:56 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2002-07-26 21:49:56 +0000 |
commit | dbedccc75a0b651c803cb3e4ced375e02377112c (patch) | |
tree | 858afd761831e0be534de5b0a6fb07e0a3461ba7 | |
parent | a7261163be4fef530e60b0311f40125d6f0337fc (diff) | |
download | samba-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.c | 9 |
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); |