]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/at.c
Clean up include logging
[openldap] / servers / slapd / at.c
index 5a618ae2969db99d2441b2866ef52de92988353b..4859040aea85865a111f6ba51b1d72a6e8eb0342 100644 (file)
@@ -239,13 +239,26 @@ at_add(
        char                    *cname;
 
        if ( at->at_names && at->at_names[0] ) {
+               int i;
+
+               for( i=0; at->at_names[i]; i++ ) {
+                       if( !slap_valid_descr( at->at_names[i] ) ) {
+                               return SLAP_SCHERR_BAD_DESCR;
+                       }
+               }
+
                cname = at->at_names[0];
+
        } else if ( at->at_oid ) {
                cname = at->at_oid;
        } else {
-               cname = "";
                return SLAP_SCHERR_ATTR_INCOMPLETE;
        }
+
+       if ( at->at_collective ) {
+               return SLAP_SCHERR_NOT_SUPPORTED;
+       }
+
        sat = (AttributeType *) ch_calloc( 1, sizeof(AttributeType) );
        AC_MEMCPY( &sat->sat_atype, at, sizeof(LDAPAttributeType));