}
-#ifdef LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS
static int
bind_prompt( LDAP *ld, char **dnp, char **passwdp, int *authmethodp,
int freeit )
return( LDAP_SUCCESS );
}
-#endif /* LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS */
int
if ( cldapflg )
cldap_close( ld );
#endif /* LDAP_CONNECTIONLESS */
-#ifdef LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS
- if ( !cldapflg )
-#else /* LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS */
- if ( !cldapflg && bound )
-#endif /* LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS */
+
+ if ( !cldapflg ) {
ldap_unbind( ld );
+ }
exit( 0 );
break;
}
#endif /* LDAP_API_FEATURE_X_OPENLDAP_V2_DNS */
-#ifdef LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS
getline( line, sizeof(line), stdin,
"Recognize and chase referrals (0=no, 1=yes)?" );
if ( atoi( line ) != 0 ) {
ldap_set_rebind_proc( ld, bind_prompt );
}
}
-#endif /* LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS */
break;
case 'O': /* set cache options */
/*
if ( ld->ld_error != NULL && *ld->ld_error != '\0' )
fprintf( stderr, "Additional info: %s\n", ld->ld_error );
- if ( NAME_ERROR( ld->ld_errno ) && ld->ld_matched != NULL )
+ if ( LDAP_NAME_ERROR( ld->ld_errno ) && ld->ld_matched != NULL )
fprintf( stderr, "Matched DN: %s\n", ld->ld_matched );
*/
}