diff --git a/servers/slapd/schema_check.c b/servers/slapd/schema_check.c index e45a63d7d7..eba6e707dd 100644 --- a/servers/slapd/schema_check.c +++ b/servers/slapd/schema_check.c @@ -880,12 +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: