mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
fix return code in case the asserted DN does not exist (ITS#4224)
This commit is contained in:
parent
a0d9bd7890
commit
976d6b4b66
@ -67,9 +67,16 @@ dyngroup_response( Operation *op, SlapReply *rs )
|
||||
rs->sr_err = backend_group( op, NULL, &op->o_req_ndn,
|
||||
&op->oq_compare.rs_ava->aa_value, NULL, ap->ap_uri );
|
||||
op->o_do_not_cache = cache;
|
||||
if ( rs->sr_err == LDAP_SUCCESS )
|
||||
switch ( rs->sr_err ) {
|
||||
case LDAP_SUCCESS:
|
||||
rs->sr_err = LDAP_COMPARE_TRUE;
|
||||
break;
|
||||
|
||||
case LDAP_NO_SUCH_OBJECT:
|
||||
rs->sr_err = LDAP_COMPARE_FALSE;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -514,8 +514,20 @@ dynlist_compare( Operation *op, SlapReply *rs )
|
||||
rs->sr_err = backend_group( op, NULL, &op->o_req_ndn,
|
||||
&op->oq_compare.rs_ava->aa_value, dli->dli_oc, dli->dli_ad );
|
||||
op->o_do_not_cache = cache;
|
||||
if ( rs->sr_err == LDAP_SUCCESS ) {
|
||||
switch ( rs->sr_err ) {
|
||||
case LDAP_SUCCESS:
|
||||
rs->sr_err = LDAP_COMPARE_TRUE;
|
||||
break;
|
||||
|
||||
case LDAP_NO_SUCH_OBJECT:
|
||||
/* NOTE: backend_group() returns noSuchObject
|
||||
* if op_ndn does not exist; however, since
|
||||
* dynamic list expansion means that the
|
||||
* member attribute is virtually present, the
|
||||
* non-existence of the asserted value implies
|
||||
* the assertion is FALSE rather than
|
||||
* UNDEFINED */
|
||||
rs->sr_err = LDAP_COMPARE_FALSE;
|
||||
}
|
||||
|
||||
return SLAP_CB_CONTINUE;
|
||||
|
Loading…
Reference in New Issue
Block a user