mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-31 02:49:28 -05:00
ITS#3608 - ignore unavailable non-critical controls
This commit is contained in:
parent
bfe9ba5b0b
commit
55585110bf
1 changed files with 5 additions and 4 deletions
|
|
@ -821,7 +821,7 @@ backend_check_controls(
|
|||
break;
|
||||
|
||||
case LDAP_COMPARE_FALSE:
|
||||
if ( !op->o_bd->be_ctrls[ cid ] )
|
||||
if ( !op->o_bd->be_ctrls[ cid ] && (*ctrls)->ldctl_iscritical )
|
||||
{
|
||||
/* Per RFC 2251 (and LDAPBIS discussions), if the control
|
||||
* is recognized and appropriate for the operation (which
|
||||
|
|
@ -829,10 +829,11 @@ backend_check_controls(
|
|||
* use of the control when performing the operation.
|
||||
*
|
||||
* Here we find that operation extended by the control
|
||||
* is not unavailable in a particular context, hence the
|
||||
* return of unwillingToPerform.
|
||||
* is unavailable in a particular context, and the control
|
||||
* is marked Critical, hence the return of
|
||||
* unwillingToPerform.
|
||||
*/
|
||||
rs->sr_text = "control unavailable in context";
|
||||
rs->sr_text = "critical control unavailable in context";
|
||||
rs->sr_err = LDAP_UNWILLING_TO_PERFORM;
|
||||
goto done;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue