Referrals should not (except in special cases) be

returned for Bind operations, instead invalidCreditials
should be returned.
This commit is contained in:
Kurt Zeilenga 2004-08-28 01:08:24 +00:00
parent f39d6f80fb
commit 49bd9befa4

View File

@ -550,22 +550,10 @@ fe_op_bind( Operation *op, SlapReply *rs )
*/ */
if ( (op->o_bd = select_backend( &op->o_req_ndn, 0, 0 )) == NULL ) { if ( (op->o_bd = select_backend( &op->o_req_ndn, 0, 0 )) == NULL ) {
if ( default_referral ) { /* don't return referral for bind requests */
rs->sr_ref = referral_rewrite( default_referral, /* noSuchObject is not allowed to be returned by bind */
NULL, &op->o_req_dn, LDAP_SCOPE_DEFAULT ); rs->sr_err = LDAP_INVALID_CREDENTIALS;
if (!rs->sr_ref) rs->sr_ref = default_referral; send_ldap_result( op, rs );
rs->sr_err = LDAP_REFERRAL;
send_ldap_result( op, rs );
if (rs->sr_ref != default_referral) ber_bvarray_free( rs->sr_ref );
} else {
/* noSuchObject is not allowed to be returned by bind */
rs->sr_err = LDAP_INVALID_CREDENTIALS;
send_ldap_result( op, rs );
}
goto cleanup; goto cleanup;
} }