if ( !rs->sr_ref ) rs->sr_ref = default_referral;
if ( rs->sr_ref ) {
rs->sr_err = LDAP_REFERRAL;
+ op->o_bd = frontendDB;
send_ldap_result( op, rs );
+ op->o_bd = NULL;
if ( rs->sr_ref != default_referral ) {
ber_bvarray_free( rs->sr_ref );
}
} else {
+ op->o_bd = frontendDB;
send_ldap_error( op, rs, LDAP_UNWILLING_TO_PERFORM,
"no global superior knowledge" );
+ op->o_bd = NULL;
}
goto done;
}
/* don't return referral for bind requests */
/* noSuchObject is not allowed to be returned by bind */
rs->sr_err = LDAP_INVALID_CREDENTIALS;
+ op->o_bd = frontendDB;
send_ldap_result( op, rs );
+ op->o_bd = NULL;
goto cleanup;
}
rs->sr_err = LDAP_REFERRAL;
if (!rs->sr_ref) rs->sr_ref = default_referral;
+ op->o_bd = frontendDB;
send_ldap_result( op, rs );
+ op->o_bd = NULL;
if (rs->sr_ref != default_referral) ber_bvarray_free( rs->sr_ref );
rs->sr_err = 0;
if ( rs->sr_ref != NULL ) {
rs->sr_err = LDAP_REFERRAL;
+ op->o_bd = frontendDB;
send_ldap_result( op, rs );
+ op->o_bd = NULL;
if (rs->sr_ref != default_referral) ber_bvarray_free( rs->sr_ref );
} else {
+ op->o_bd = frontendDB;
send_ldap_error( op, rs, LDAP_UNWILLING_TO_PERFORM,
"no global superior knowledge" );
+ op->o_bd = NULL;
}
goto cleanup;
}
if (rs->sr_ref != NULL ) {
rs->sr_err = LDAP_REFERRAL;
+ op->o_bd = frontendDB;
send_ldap_result( op, rs );
+ op->o_bd = NULL;
if (rs->sr_ref != default_referral) ber_bvarray_free( rs->sr_ref );
} else {
+ op->o_bd = frontendDB;
send_ldap_error( op, rs, LDAP_UNWILLING_TO_PERFORM,
"no global superior knowledge" );
+ op->o_bd = NULL;
}
goto cleanup;
}
if ( rs->sr_ref != NULL ) {
rs->sr_err = LDAP_REFERRAL;
+ op->o_bd = frontendDB;
send_ldap_result( op, rs );
+ op->o_bd = NULL;
if (rs->sr_ref != default_referral) ber_bvarray_free( rs->sr_ref );
} else {
+ op->o_bd = frontendDB;
send_ldap_error( op, rs, LDAP_UNWILLING_TO_PERFORM,
"no global superior knowledge" );
+ op->o_bd = NULL;
}
goto cleanup;
}
if (!rs->sr_ref) rs->sr_ref = default_referral;
rs->sr_err = LDAP_REFERRAL;
+ op->o_bd = frontendDB;
send_ldap_result( op, rs );
+ op->o_bd = NULL;
if (rs->sr_ref != default_referral)
ber_bvarray_free( rs->sr_ref );