]> git.sur5r.net Git - openldap/commitdiff
Use dnNormalize
authorHoward Chu <hyc@openldap.org>
Wed, 26 Dec 2001 16:23:32 +0000 (16:23 +0000)
committerHoward Chu <hyc@openldap.org>
Wed, 26 Dec 2001 16:23:32 +0000 (16:23 +0000)
servers/slapd/schema.c

index da4b968f98a88ecb49b2127f6cf317ab70adc18f..d3f602b8997427e7890bd11b3827b1baec3bbf6f 100644 (file)
@@ -28,7 +28,7 @@ schema_info( Entry **entry, const char **text )
                = slap_schema.si_ad_objectClass;
 
        Entry           *e;
-       struct berval   val;
+       struct berval   val, *ndn = NULL;
        struct berval   *vals[2];
 
        vals[0] = &val;
@@ -37,9 +37,10 @@ schema_info( Entry **entry, const char **text )
        e = (Entry *) ch_calloc( 1, sizeof(Entry) );
 
        e->e_attrs = NULL;
-       e->e_dn = ch_strdup( SLAPD_SCHEMA_DN );
-       e->e_ndn = ch_strdup( SLAPD_SCHEMA_DN );
-       (void) dn_normalize( e->e_ndn );
+       ber_str2bv( SLAPD_SCHEMA_DN, sizeof(SLAPD_SCHEMA_DN)-1, 1, &e->e_name);
+       dnNormalize( NULL, &e->e_name, &ndn );
+       e->e_nname = *ndn;
+       free( ndn );
        e->e_private = NULL;
 
        val.bv_val = "LDAPsubentry";