[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Rebind callback not being called on Linux
- To: OpenLDAP software list <openldap-software@OpenLDAP.org>
- Subject: Rebind callback not being called on Linux
- From: Kapil Surlaker <kapil.surlaker@gmail.com>
- Date: Thu, 29 Dec 2005 18:19:37 -0800
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=TXu0Pa2ozVT0uZDgh6jr37nUDFkuiwbv0xz8HkGYpPWVWoEd6sRe93M6kfueKRysoiJg4XZ8iGnKhtvowYmd91y2WrFADd6NsdVQiwrd/EZo9Hvg/f84F8MYlbKiHVvjD3hEYnKz3UJ07XWaFavPMCJ1KbjQ4A0B6zb6JcXSMk4=
I tried this against an active directory server both on Linux and Windows.
While on windows, the rebind callback does get called, it does not get
called on Linux. Using Ethereal, I looked at the packets sent by the LDAP
server and I can see that referrals are indeed being sent back.
Is this a known issue or am I doing something wrong ?
Thanks,
Kapil
<Relevant section of Code>
version = LDAP_VERSION3;
rc = ldap_set_option( ld, LDAP_OPT_PROTOCOL_VERSION, &version );
if ( rc != LDAP_SUCCESS ) {
fprintf(stderr, "Cannot set option: %s\n", ldap_err2string(rc));
return( 1 );
}
rc = ldap_set_option(ld,LDAP_OPT_REFERRALS,LDAP_OPT_ON);
if (rc != LDAP_SUCCESS){
fprintf( stderr, "ldap_set_option: %s\n",
ldap_err2string( rc ));
return( 1 );
}
ldap_set_rebind_proc(ld, rebindproc, (void *)0);
/* Bind to the LDAP server. */
rc = ldap_simple_bind_s( ld, UserName, Password);
if ( rc != LDAP_SUCCESS ) {
fprintf(stderr, "ldap_simple_bind_s: %s\n", ldap_err2string(rc));
return( 1 );
}
/* Search one level under the starting point. */
rc = ldap_search_s( ld, my_searchbase, LDAP_SCOPE_SUBTREE, my_filter2,
attrs, 0, &result );