]> git.sur5r.net Git - openldap/commitdiff
ITS#5965
authorQuanah Gibson-Mount <quanah@openldap.org>
Sun, 22 Feb 2009 21:56:29 +0000 (21:56 +0000)
committerQuanah Gibson-Mount <quanah@openldap.org>
Sun, 22 Feb 2009 21:56:29 +0000 (21:56 +0000)
CHANGES
servers/slapd/schema_check.c

diff --git a/CHANGES b/CHANGES
index 3e063c6f0b1b48713c68bd3d2ec50763627a3c73..15064e016b97eabab859060e571c73d6de4d439e 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -6,6 +6,7 @@ OpenLDAP 2.4.15 Release (2009/02/19)
        Fixed slapd bconfig conversion again (ITS#5346)
        Fixed slapd corrupt contextCSN (ITS#5947)
        Fixed slapd syncrepl order to match on add/delete (ITS#5954)
+       Fixed slapd adding rdn with other values (ITS#5965)
        Fixed slapd-bdb/hdb behavior with unallocatable shm (ITS#5956)
        Fixed slapd-ldap/meta with entries with invalid attrs (ITS#5959)
        Fixed slapd-relay control initialization (ITS#5724)
index b466613c47d30e9a93e5a5f46c8db210909f458a..e95b3625cd132e1c265cdade85405cf292fd96ac 100644 (file)
@@ -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",