]> git.sur5r.net Git - openldap/commitdiff
Content rule logic fix
authorLuke Howard <lukeh@openldap.org>
Mon, 5 May 2003 09:17:10 +0000 (09:17 +0000)
committerLuke Howard <lukeh@openldap.org>
Mon, 5 May 2003 09:17:10 +0000 (09:17 +0000)
servers/slapd/schema_check.c

index e5decfea704d2b427fe24c94626d0b3ceef24b2d..ee3067afbab82b607508c4a3ef759c0d9db63d03 100644 (file)
@@ -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 ) {