From 1b3007c22cb225be6e7c65dd1272c2e7b4cfdbda Mon Sep 17 00:00:00 2001 From: Luke Howard Date: Mon, 5 May 2003 09:17:10 +0000 Subject: [PATCH] Content rule logic fix --- servers/slapd/schema_check.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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 ) { -- 2.39.5