]> git.sur5r.net Git - openldap/commitdiff
clear rc if value must be added (ITS#5819)
authorPierangelo Masarati <ando@openldap.org>
Wed, 19 Nov 2008 16:02:22 +0000 (16:02 +0000)
committerPierangelo Masarati <ando@openldap.org>
Wed, 19 Nov 2008 16:02:22 +0000 (16:02 +0000)
servers/slapd/schema_check.c

index ca0f7309809a65898ff5afdef63719f80dffe033..e45a63d7d7f38a7068de8a5d053fcaeb57a42b93 100644 (file)
@@ -885,6 +885,7 @@ entry_naming_check(
                                                ava->la_attr.bv_val );
                                        if ( add_naming ) {
                                                add = 1;
+                                               rc = LDAP_SUCCESS;
                                        }
                                        break;
                                default:
@@ -892,7 +893,10 @@ entry_naming_check(
                                                "naming attribute '%s' is inappropriate",
                                                ava->la_attr.bv_val );
                                }
-                               rc = LDAP_NAMING_VIOLATION;
+
+                               if ( !add ) {
+                                       rc = LDAP_NAMING_VIOLATION;
+                               }
                        }
                }