X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fschema_check.c;h=e95b3625cd132e1c265cdade85405cf292fd96ac;hb=6044e46ec7af21658829edde47c4c9c904093df3;hp=b466613c47d30e9a93e5a5f46c8db210909f458a;hpb=260fd357df7df4a47eea79f552f52e0affc575ef;p=openldap diff --git a/servers/slapd/schema_check.c b/servers/slapd/schema_check.c index b466613c47..e95b3625cd 100644 --- a/servers/slapd/schema_check.c +++ b/servers/slapd/schema_check.c @@ -881,7 +881,7 @@ entry_naming_check( SLAP_MR_ATTRIBUTE_VALUE_NORMALIZED_MATCH, &ava->la_value, NULL, NULL ); - if( rc != 0 ) { + if ( rc != 0 ) { switch( rc ) { case LDAP_INAPPROPRIATE_MATCHING: snprintf( textbuf, textlen, @@ -895,8 +895,16 @@ entry_naming_check( break; case LDAP_NO_SUCH_ATTRIBUTE: if ( add_naming ) { - add = 1; - rc = LDAP_SUCCESS; + if ( is_at_single_value( desc->ad_type ) ) { + snprintf( textbuf, textlen, + "value of single-valued naming attribute '%s' conflicts with value present in entry", + ava->la_attr.bv_val ); + + } else { + add = 1; + rc = LDAP_SUCCESS; + } + } else { snprintf( textbuf, textlen, "value of naming attribute '%s' is not present in entry",