From: Luke Howard Date: Mon, 5 May 2003 09:17:10 +0000 (+0000) Subject: Content rule logic fix X-Git-Tag: OPENLDAP_REL_ENG_2_2_0ALPHA~168 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=1b3007c22cb225be6e7c65dd1272c2e7b4cfdbda;p=openldap Content rule logic fix --- diff --git a/servers/slapd/schema_check.c b/servers/slapd/schema_check.c index e5decfea70..ee3067afba 100644 --- a/servers/slapd/schema_check.c +++ b/servers/slapd/schema_check.c @@ -437,18 +437,22 @@ entry_schema_check( #ifdef SLAP_EXTENDED_SCHEMA if( oc->soc_kind == LDAP_SCHEMA_AUXILIARY ) { - int k=0; + int k; + if( cr ) { + k = -1; if( cr->scr_auxiliaries ) { for( ; cr->scr_auxiliaries[k]; k++ ) { if( cr->scr_auxiliaries[k] == oc ) { - k=-1; + k = 0; break; } } } } else if ( global_disallows & SLAP_DISALLOW_AUX_WO_CR ) { - k=-1; + k = -1; + } else { + k = 0; } if( k == -1 ) {