]> git.sur5r.net Git - openldap/commitdiff
ITS#4788 op->o_no_schema_check allows unknown attrs in slap_mods_check
authorHoward Chu <hyc@openldap.org>
Sun, 24 Dec 2006 07:14:54 +0000 (07:14 +0000)
committerHoward Chu <hyc@openldap.org>
Sun, 24 Dec 2006 07:14:54 +0000 (07:14 +0000)
servers/slapd/modify.c

index f8f709244d83c0a95db38546332b1c1ac18779a7..f84026220864d369fd6276fadf76659b3f2e2736 100644 (file)
@@ -554,6 +554,12 @@ int slap_mods_check(
                /* convert to attribute description */
                if ( ml->sml_desc == NULL ) {
                        rc = slap_bv2ad( &ml->sml_type, &ml->sml_desc, text );
+                       if( rc != LDAP_SUCCESS ) {
+                               if ( get_no_schema_check( op )) {
+                                       rc = slap_bv2undef_ad( &ml->sml_type, &ml->sml_desc,
+                                               text, 0 );
+                               }
+                       }
                        if( rc != LDAP_SUCCESS ) {
                                snprintf( textbuf, textlen, "%s: %s",
                                        ml->sml_type.bv_val, *text );