]> git.sur5r.net Git - openldap/commitdiff
ITS#6006 dummy entry needs objectclass attr. (Previous fix to ITS#4961
authorHoward Chu <hyc@openldap.org>
Sat, 7 Mar 2009 02:23:20 +0000 (02:23 +0000)
committerHoward Chu <hyc@openldap.org>
Sat, 7 Mar 2009 02:23:20 +0000 (02:23 +0000)
was incomplete. This patch obsoletes the patch for ITS#3616.)

servers/slapd/back-bdb/init.c

index c92ebcef445f08c02608e6d4f38efbcae4d6bdaa..885528563f23d1564c00d70bc7f2389a3b09ef3e 100644 (file)
@@ -537,10 +537,15 @@ shm_retry:
                rc = bdb_id2entry( be, NULL, 0, &e );
        }
        if ( !e ) {
+               struct berval gluebv = BER_BVC("glue");
                e = entry_alloc();
                e->e_id = 0;
                ber_dupbv( &e->e_name, (struct berval *)&slap_empty_bv );
                ber_dupbv( &e->e_nname, (struct berval *)&slap_empty_bv );
+               attr_merge_one( e, slap_schema.si_ad_objectClass,
+                       &gluebv, NULL );
+               attr_merge_one( e, slap_schema.si_ad_structuralObjectClass,
+                       &gluebv, NULL );
        }
        e->e_ocflags = SLAP_OC_GLUE|SLAP_OC__END;
        e->e_private = &bdb->bi_cache.c_dntree;