--- servers/slapd/schema_check.c 2008/04/18 22:33:55 1.103.2.6 +++ servers/slapd/schema_check.c 2008/11/19 20:11:21 1.103.2.7 @@ -1,5 +1,5 @@ /* schema_check.c - routines to enforce schema definitions */ -/* $OpenLDAP: pkg/ldap/servers/slapd/schema_check.c,v 1.103.2.5 2008/04/14 20:23:04 quanah Exp $ */ +/* $OpenLDAP: pkg/ldap/servers/slapd/schema_check.c,v 1.103.2.6 2008/04/18 22:33:55 ando Exp $ */ /* This work is part of OpenLDAP Software . * * Copyright 1998-2008 The OpenLDAP Foundation. @@ -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; + } } }