mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
global overlays need to set o_bd = frontendDB to return the error in case no database can be selected
This commit is contained in:
parent
9effc2b8f0
commit
b70abdcbce
@ -220,14 +220,18 @@ fe_op_add( Operation *op, SlapReply *rs )
|
|||||||
if ( !rs->sr_ref ) rs->sr_ref = default_referral;
|
if ( !rs->sr_ref ) rs->sr_ref = default_referral;
|
||||||
if ( rs->sr_ref ) {
|
if ( rs->sr_ref ) {
|
||||||
rs->sr_err = LDAP_REFERRAL;
|
rs->sr_err = LDAP_REFERRAL;
|
||||||
|
op->o_bd = frontendDB;
|
||||||
send_ldap_result( op, rs );
|
send_ldap_result( op, rs );
|
||||||
|
op->o_bd = NULL;
|
||||||
|
|
||||||
if ( rs->sr_ref != default_referral ) {
|
if ( rs->sr_ref != default_referral ) {
|
||||||
ber_bvarray_free( rs->sr_ref );
|
ber_bvarray_free( rs->sr_ref );
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
op->o_bd = frontendDB;
|
||||||
send_ldap_error( op, rs, LDAP_UNWILLING_TO_PERFORM,
|
send_ldap_error( op, rs, LDAP_UNWILLING_TO_PERFORM,
|
||||||
"no global superior knowledge" );
|
"no global superior knowledge" );
|
||||||
|
op->o_bd = NULL;
|
||||||
}
|
}
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
@ -464,7 +464,9 @@ fe_op_bind( Operation *op, SlapReply *rs )
|
|||||||
/* don't return referral for bind requests */
|
/* don't return referral for bind requests */
|
||||||
/* noSuchObject is not allowed to be returned by bind */
|
/* noSuchObject is not allowed to be returned by bind */
|
||||||
rs->sr_err = LDAP_INVALID_CREDENTIALS;
|
rs->sr_err = LDAP_INVALID_CREDENTIALS;
|
||||||
|
op->o_bd = frontendDB;
|
||||||
send_ldap_result( op, rs );
|
send_ldap_result( op, rs );
|
||||||
|
op->o_bd = NULL;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -208,7 +208,9 @@ fe_op_compare( Operation *op, SlapReply *rs )
|
|||||||
|
|
||||||
rs->sr_err = LDAP_REFERRAL;
|
rs->sr_err = LDAP_REFERRAL;
|
||||||
if (!rs->sr_ref) rs->sr_ref = default_referral;
|
if (!rs->sr_ref) rs->sr_ref = default_referral;
|
||||||
|
op->o_bd = frontendDB;
|
||||||
send_ldap_result( op, rs );
|
send_ldap_result( op, rs );
|
||||||
|
op->o_bd = NULL;
|
||||||
|
|
||||||
if (rs->sr_ref != default_referral) ber_bvarray_free( rs->sr_ref );
|
if (rs->sr_ref != default_referral) ber_bvarray_free( rs->sr_ref );
|
||||||
rs->sr_err = 0;
|
rs->sr_err = 0;
|
||||||
|
@ -124,12 +124,16 @@ fe_op_delete( Operation *op, SlapReply *rs )
|
|||||||
if ( rs->sr_ref != NULL ) {
|
if ( rs->sr_ref != NULL ) {
|
||||||
rs->sr_err = LDAP_REFERRAL;
|
rs->sr_err = LDAP_REFERRAL;
|
||||||
|
|
||||||
|
op->o_bd = frontendDB;
|
||||||
send_ldap_result( op, rs );
|
send_ldap_result( op, rs );
|
||||||
|
op->o_bd = NULL;
|
||||||
|
|
||||||
if (rs->sr_ref != default_referral) ber_bvarray_free( rs->sr_ref );
|
if (rs->sr_ref != default_referral) ber_bvarray_free( rs->sr_ref );
|
||||||
} else {
|
} else {
|
||||||
|
op->o_bd = frontendDB;
|
||||||
send_ldap_error( op, rs, LDAP_UNWILLING_TO_PERFORM,
|
send_ldap_error( op, rs, LDAP_UNWILLING_TO_PERFORM,
|
||||||
"no global superior knowledge" );
|
"no global superior knowledge" );
|
||||||
|
op->o_bd = NULL;
|
||||||
}
|
}
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
@ -316,12 +316,16 @@ fe_op_modify( Operation *op, SlapReply *rs )
|
|||||||
|
|
||||||
if (rs->sr_ref != NULL ) {
|
if (rs->sr_ref != NULL ) {
|
||||||
rs->sr_err = LDAP_REFERRAL;
|
rs->sr_err = LDAP_REFERRAL;
|
||||||
|
op->o_bd = frontendDB;
|
||||||
send_ldap_result( op, rs );
|
send_ldap_result( op, rs );
|
||||||
|
op->o_bd = NULL;
|
||||||
|
|
||||||
if (rs->sr_ref != default_referral) ber_bvarray_free( rs->sr_ref );
|
if (rs->sr_ref != default_referral) ber_bvarray_free( rs->sr_ref );
|
||||||
} else {
|
} else {
|
||||||
|
op->o_bd = frontendDB;
|
||||||
send_ldap_error( op, rs, LDAP_UNWILLING_TO_PERFORM,
|
send_ldap_error( op, rs, LDAP_UNWILLING_TO_PERFORM,
|
||||||
"no global superior knowledge" );
|
"no global superior knowledge" );
|
||||||
|
op->o_bd = NULL;
|
||||||
}
|
}
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
@ -238,12 +238,16 @@ fe_op_modrdn( Operation *op, SlapReply *rs )
|
|||||||
|
|
||||||
if ( rs->sr_ref != NULL ) {
|
if ( rs->sr_ref != NULL ) {
|
||||||
rs->sr_err = LDAP_REFERRAL;
|
rs->sr_err = LDAP_REFERRAL;
|
||||||
|
op->o_bd = frontendDB;
|
||||||
send_ldap_result( op, rs );
|
send_ldap_result( op, rs );
|
||||||
|
op->o_bd = NULL;
|
||||||
|
|
||||||
if (rs->sr_ref != default_referral) ber_bvarray_free( rs->sr_ref );
|
if (rs->sr_ref != default_referral) ber_bvarray_free( rs->sr_ref );
|
||||||
} else {
|
} else {
|
||||||
|
op->o_bd = frontendDB;
|
||||||
send_ldap_error( op, rs, LDAP_UNWILLING_TO_PERFORM,
|
send_ldap_error( op, rs, LDAP_UNWILLING_TO_PERFORM,
|
||||||
"no global superior knowledge" );
|
"no global superior knowledge" );
|
||||||
|
op->o_bd = NULL;
|
||||||
}
|
}
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
@ -353,7 +353,9 @@ fe_op_search( Operation *op, SlapReply *rs )
|
|||||||
|
|
||||||
if (!rs->sr_ref) rs->sr_ref = default_referral;
|
if (!rs->sr_ref) rs->sr_ref = default_referral;
|
||||||
rs->sr_err = LDAP_REFERRAL;
|
rs->sr_err = LDAP_REFERRAL;
|
||||||
|
op->o_bd = frontendDB;
|
||||||
send_ldap_result( op, rs );
|
send_ldap_result( op, rs );
|
||||||
|
op->o_bd = NULL;
|
||||||
|
|
||||||
if (rs->sr_ref != default_referral)
|
if (rs->sr_ref != default_referral)
|
||||||
ber_bvarray_free( rs->sr_ref );
|
ber_bvarray_free( rs->sr_ref );
|
||||||
|
Loading…
Reference in New Issue
Block a user