]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/oc.c
Move backend_syncfreq code down into back-ldbm. Creates new configuration
[openldap] / servers / slapd / oc.c
index 5ecb0e73e534c1828a15553124ed93dc37b4e67a..d245e4a0d263bc0127c70b8871a4f50e3cef0bdc 100644 (file)
@@ -357,6 +357,16 @@ oc_add(
        ObjectClass     *soc;
        int             code;
 
+       if ( oc->oc_names != NULL ) {
+               int i;
+
+               for( i=0; oc->oc_names[i]; i++ ) {
+                       if( !slap_valid_descr( oc->oc_names[i] ) ) {
+                               return SLAP_SCHERR_BAD_DESCR;
+                       }
+               }
+       }
+
        soc = (ObjectClass *) ch_calloc( 1, sizeof(ObjectClass) );
        AC_MEMCPY( &soc->soc_oclass, oc, sizeof(LDAPObjectClass) );