]> git.sur5r.net Git - openldap/commitdiff
Fix prev commit
authorHoward Chu <hyc@openldap.org>
Sun, 11 Feb 2007 14:37:21 +0000 (14:37 +0000)
committerHoward Chu <hyc@openldap.org>
Sun, 11 Feb 2007 14:37:21 +0000 (14:37 +0000)
servers/slapd/schema_check.c

index 7d0ce830c2cb9d210112cfd8fea466b0e26b13eb..19bed5b3bbcf03133ed0b5bc94de560842d0f4a2 100644 (file)
@@ -387,10 +387,12 @@ got_soc:
                                                        }
                                                }
                                        }
-                                       snprintf( textbuf, textlen, 
-                                               "class '%s' not allowed by content rule '%s'",
-                                               oc->soc_cname.bv_val,
-                                               ldap_contentrule2name( &cr->scr_crule ) );
+                                       if ( k ) {
+                                               snprintf( textbuf, textlen, 
+                                                       "class '%s' not allowed by content rule '%s'",
+                                                       oc->soc_cname.bv_val,
+                                                       ldap_contentrule2name( &cr->scr_crule ) );
+                                       }
                                } else if ( global_disallows & SLAP_DISALLOW_AUX_WO_CR ) {
                                        k = -1;
                                        snprintf( textbuf, textlen,