ITS#6006 dummy entry needs objectclass attr. (Previous fix to ITS#4961

was incomplete. This patch obsoletes the patch for ITS#3616.)
This commit is contained in:
Howard Chu 2009-03-07 02:23:20 +00:00
parent 7029d640cb
commit 89cfbe3b6e

View 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;