mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-28 02:29:34 -05:00
Place control availability kludge behind
#ifdef SLAP_CONTROL_AVAILABILITY_KLUDGE for now. Me think its still needed (at least for FRONTEND controls).
This commit is contained in:
parent
5ec9684894
commit
ab455a5ec7
4 changed files with 20 additions and 17 deletions
|
|
@ -845,11 +845,15 @@ backend_check_controls(
|
|||
|
||||
if( ctrls ) {
|
||||
for( ; *ctrls != NULL ; ctrls++ ) {
|
||||
/* KLUDGE: ldctl_iscritical munged by controls.c:get_ctrls()
|
||||
* to ensure this check is enabled/disabled appropriately.
|
||||
*/
|
||||
if( (*ctrls)->ldctl_iscritical && !ldap_charray_inlist(
|
||||
op->o_bd->be_controls, (*ctrls)->ldctl_oid ) )
|
||||
if(
|
||||
#ifdef SLAP_CONTROL_AVAILABILITY_KLUDGE
|
||||
/* KLUDGE: ldctl_iscritical munged by controls.c:get_ctrls()
|
||||
* to ensure this check is enabled/disabled appropriately.
|
||||
*/
|
||||
(*ctrls)->ldctl_iscritical &&
|
||||
#endif
|
||||
!ldap_charray_inlist( op->o_bd->be_controls,
|
||||
(*ctrls)->ldctl_oid ) )
|
||||
{
|
||||
/* Per RFC 2251 (and LDAPBIS discussions), if the control
|
||||
* is recognized and appropriate for the operation (which
|
||||
|
|
|
|||
|
|
@ -612,6 +612,7 @@ int get_ctrls(
|
|||
goto return_results;
|
||||
}
|
||||
|
||||
#ifdef SLAP_CONTROL_AVAILABILITY_KLUDGE
|
||||
if ( sc->sc_mask & SLAP_CTRL_FRONTEND ) {
|
||||
/* KLUDGE: disable backend_control() check */
|
||||
c->ldctl_iscritical = 0;
|
||||
|
|
@ -626,6 +627,7 @@ int get_ctrls(
|
|||
/* KLUDGE: enable backend_control() check */
|
||||
c->ldctl_iscritical = 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
} else if( c->ldctl_iscritical ) {
|
||||
/* unavailable CRITICAL control */
|
||||
|
|
|
|||
|
|
@ -217,9 +217,7 @@ register_matching_rule(
|
|||
int code;
|
||||
const char *err;
|
||||
|
||||
if( def->mrd_usage == SLAP_MR_NONE &&
|
||||
def->mrd_compat_syntaxes == NULL )
|
||||
{
|
||||
if( def->mrd_usage == SLAP_MR_NONE && def->mrd_compat_syntaxes == NULL ) {
|
||||
Debug( LDAP_DEBUG_ANY, "register_matching_rule: not usable %s\n",
|
||||
def->mrd_desc, 0, 0 );
|
||||
|
||||
|
|
@ -228,10 +226,9 @@ register_matching_rule(
|
|||
|
||||
if( def->mrd_associated != NULL ) {
|
||||
amr = mr_find( def->mrd_associated );
|
||||
|
||||
if( amr == NULL ) {
|
||||
Debug( LDAP_DEBUG_ANY, "register_matching_rule: could not locate "
|
||||
"associated matching rule %s for %s\n",
|
||||
Debug( LDAP_DEBUG_ANY, "register_matching_rule: "
|
||||
"could not locate associated matching rule %s for %s\n",
|
||||
def->mrd_associated, def->mrd_desc, 0 );
|
||||
|
||||
return -1;
|
||||
|
|
@ -243,17 +240,15 @@ register_matching_rule(
|
|||
if (( def->mrd_usage & SLAP_MR_EQUALITY ) &&
|
||||
(( def->mrd_usage & SLAP_MR_SUBTYPE_MASK ) != SLAP_MR_NONE ))
|
||||
{
|
||||
Debug( LDAP_DEBUG_ANY,
|
||||
"register_matching_rule: inappropriate (approx) association "
|
||||
"%s for %s\n",
|
||||
Debug( LDAP_DEBUG_ANY, "register_matching_rule: "
|
||||
"inappropriate (approx) association %s for %s\n",
|
||||
def->mrd_associated, def->mrd_desc, 0 );
|
||||
return -1;
|
||||
}
|
||||
|
||||
} else if (!( amr->smr_usage & SLAP_MR_EQUALITY )) {
|
||||
Debug( LDAP_DEBUG_ANY,
|
||||
"register_matching_rule: inappropriate (equalilty) association "
|
||||
"%s for %s\n",
|
||||
Debug( LDAP_DEBUG_ANY, "register_matching_rule: "
|
||||
"inappropriate (equalilty) association %s for %s\n",
|
||||
def->mrd_associated, def->mrd_desc, 0 );
|
||||
return -1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,6 +58,8 @@
|
|||
|
||||
LDAP_BEGIN_DECL
|
||||
|
||||
#define SLAP_CONTROL_AVAILABILITY_KLUDGE
|
||||
|
||||
#ifdef LDAP_DEVEL
|
||||
#define SLAP_ACL_HONOR_DISCLOSE /* partially implemented */
|
||||
#define SLAP_DYNACL
|
||||
|
|
|
|||
Loading…
Reference in a new issue