X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;ds=sidebyside;f=servers%2Fslapd%2Fschema_check.c;h=eba6e707dd31cfcb78d13d76c63b154eb3fe1443;hb=55010d5e4e39e21fc993b8b08887cc3d1c9d11a8;hp=b370876da6253d0e8aaf0b52e32f7a759ebdb860;hpb=3196e65ff2a47392dabd5cf566cea6aabe159034;p=openldap diff --git a/servers/slapd/schema_check.c b/servers/slapd/schema_check.c index b370876da6..eba6e707dd 100644 --- a/servers/slapd/schema_check.c +++ b/servers/slapd/schema_check.c @@ -356,8 +356,8 @@ got_soc: } } - if( xc == NULL ) { - snprintf( textbuf, textlen, "instanstantiation of " + if( xc != NULL ) { + snprintf( textbuf, textlen, "instantiation of " "abstract objectClass '%s' not allowed", aoc->a_vals[i].bv_val ); @@ -880,11 +880,13 @@ entry_naming_check( ava->la_attr.bv_val ); break; case LDAP_NO_SUCH_ATTRIBUTE: - snprintf( textbuf, textlen, - "value of naming attribute '%s' is not present in entry", - ava->la_attr.bv_val ); if ( add_naming ) { add = 1; + rc = LDAP_SUCCESS; + } else { + snprintf( textbuf, textlen, + "value of naming attribute '%s' is not present in entry", + ava->la_attr.bv_val ); } break; default: @@ -892,7 +894,10 @@ entry_naming_check( "naming attribute '%s' is inappropriate", ava->la_attr.bv_val ); } - rc = LDAP_NAMING_VIOLATION; + + if ( !add ) { + rc = LDAP_NAMING_VIOLATION; + } } }