[Date Prev][Date Next] [Chronological] [Thread] [Top]

Rebind callback not being called on Linux

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 ?


<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 );