]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/schema_check.c
minor cleanup
[openldap] / servers / slapd / schema_check.c
index 6f7d993dd6df957bb0a6612c16438816953b08df..87ba819c1d35e1a44a2d361067fe720855245234 100644 (file)
@@ -48,7 +48,7 @@ entry_schema_check(
                if( is_at_single_value( a->a_desc->ad_type ) &&
                        a->a_vals[1] != NULL )
                {
-                       char *type = a->a_desc->ad_cname->bv_val;
+                       char *type = a->a_desc->ad_cname.bv_val;
 
                        snprintf( textbuf, textlen, 
                                "attribute '%s' cannot have multiple values",
@@ -139,7 +139,7 @@ entry_schema_check(
        for ( a = e->e_attrs; a != NULL; a = a->a_next ) {
                int ret = oc_check_allowed( a->a_desc->ad_type, aoc->a_vals );
                if ( ret != LDAP_SUCCESS ) {
-                       char *type = a->a_desc->ad_cname->bv_val;
+                       char *type = a->a_desc->ad_cname.bv_val;
 
                        snprintf( textbuf, textlen, 
                                "attribute '%s' not allowed",
@@ -202,7 +202,7 @@ oc_check_required( Entry *e, struct berval *ocname )
                }
                /* not there => schema violation */
                if ( a == NULL ) {
-                       return at->sat_cname;
+                       return at->sat_cname.bv_val;
                }
        }
 
@@ -218,19 +218,18 @@ int oc_check_allowed(
 
 #ifdef NEW_LOGGING
        LDAP_LOG(( "schema", LDAP_LEVEL_ENTRY,
-                  "oc_check_allowed: type \"%s\"\n", at->sat_cname ));
+                  "oc_check_allowed: type \"%s\"\n", at->sat_cname.bv_val ));
 #else
        Debug( LDAP_DEBUG_TRACE,
                "oc_check_allowed type \"%s\"\n",
-               at->sat_cname, 0, 0 );
+               at->sat_cname.bv_val, 0, 0 );
 #endif
 
        /* always allow objectClass attribute */
-       if ( strcasecmp( at->sat_cname, "objectClass" ) == 0 ) {
+       if ( strcasecmp( at->sat_cname.bv_val, "objectClass" ) == 0 ) {
                return LDAP_SUCCESS;
        }
 
-
        /*
         * All operational attributions are allowed by schema rules.
         */