mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-31 20:19:34 -05:00
don't allow to add distinguished values when other values of naming attributes are already present (ITS#5965)
This commit is contained in:
parent
2024d5af85
commit
f2a4158e0d
1 changed files with 11 additions and 3 deletions
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Reference in a new issue