STRLENOF( "olcDatabase" ), "=frontend",
STRLENOF( "=frontend" ))) {
Entry *fe;
- struct berval rdn;
+ struct berval rdn, vals[ 2 ];
+ Attribute *attr;
+ vals[1].bv_len = 0;
+ vals[1].bv_val = NULL;
memset( &ca, 0, sizeof(ConfigArgs));
ca.be = frontendDB;
ca.bi = frontendDB->bd_info;
ca.bi->bi_type);
fe = config_build_entry( NULL, NULL, cfb->cb_root, &ca, &rdn,
&CFOC_DATABASE, ca.be->be_cf_ocs );
+ if( attr_find( fe->e_attrs, slap_schema.si_ad_entryUUID )
+ == NULL )
+ {
+ char uuidbuf[ LDAP_LUTIL_UUIDSTR_BUFSIZE ];
+ vals[0].bv_len = lutil_uuidstr( uuidbuf, sizeof( uuidbuf ) );
+ vals[0].bv_val = uuidbuf;
+ attr_merge_normalize_one( fe, slap_schema.si_ad_entryUUID,
+ vals, NULL );
+ }
+ if ( attr_find( fe->e_attrs, slap_schema.si_ad_entryCSN)
+ == NULL )
+ {
+ char csnbuf[ LDAP_LUTIL_CSNSTR_BUFSIZE ];
+ vals[0].bv_len = lutil_csnstr( csnbuf, sizeof( csnbuf ),
+ 0, 0 );
+ vals[0].bv_val = csnbuf;
+ attr_merge( fe, slap_schema.si_ad_entryCSN, vals, NULL );
+ }
+ attr = attr_find( e->e_attrs, slap_schema.si_ad_creatorsName );
+ if ( attr )
+ {
+ attr_merge( fe, slap_schema.si_ad_creatorsName,
+ attr->a_vals, attr->a_nvals );
+ }
+ attr = attr_find( e->e_attrs, slap_schema.si_ad_modifiersName );
+ if ( attr )
+ {
+ attr_merge( fe, slap_schema.si_ad_modifiersName,
+ attr->a_vals, attr->a_nvals );
+ }
+ attr = attr_find( e->e_attrs, slap_schema.si_ad_createTimestamp );
+ if (attr)
+ {
+ attr_merge( fe, slap_schema.si_ad_createTimestamp,
+ attr->a_vals, attr->a_nvals );
+ }
+ attr = attr_find( e->e_attrs, slap_schema.si_ad_modifyTimestamp );
+ if (attr)
+ {
+ attr_merge( fe, slap_schema.si_ad_modifyTimestamp,
+ attr->a_vals, attr->a_nvals );
+ }
if ( fe && bi && bi->bi_tool_entry_put &&
bi->bi_tool_entry_put( &cfb->cb_db, fe, text ) != NOID ) {
entry_put_got_frontend++;
STRLENOF( "olcDatabase" ), "=config",
STRLENOF( "=config" )) ) {
Entry *cfe;
- struct berval rdn;
+ struct berval rdn, vals[ 2 ];
+ Attribute *attr;
+ vals[1].bv_len = 0;
+ vals[1].bv_val = NULL;
memset( &ca, 0, sizeof(ConfigArgs));
ca.be = LDAP_STAILQ_FIRST( &backendDB );
ca.bi = ca.be->bd_info;
ca.bi->bi_type);
cfe = config_build_entry( NULL, NULL, cfb->cb_root, &ca, &rdn, &CFOC_DATABASE,
ca.be->be_cf_ocs );
+ if( attr_find( cfe->e_attrs, slap_schema.si_ad_entryUUID )
+ == NULL )
+ {
+ char uuidbuf[ LDAP_LUTIL_UUIDSTR_BUFSIZE ];
+ vals[0].bv_len = lutil_uuidstr( uuidbuf, sizeof( uuidbuf ) );
+ vals[0].bv_val = uuidbuf;
+ attr_merge_normalize_one( cfe, slap_schema.si_ad_entryUUID,
+ vals, NULL );
+ }
+ if ( attr_find( cfe->e_attrs, slap_schema.si_ad_entryCSN)
+ == NULL )
+ {
+ char csnbuf[ LDAP_LUTIL_CSNSTR_BUFSIZE ];
+ vals[0].bv_len = lutil_csnstr( csnbuf, sizeof( csnbuf ),
+ 0, 0 );
+ vals[0].bv_val = csnbuf;
+ attr_merge( cfe, slap_schema.si_ad_entryCSN, vals, NULL );
+ }
+ attr = attr_find( e->e_attrs, slap_schema.si_ad_creatorsName );
+ if ( attr )
+ {
+ attr_merge( cfe, slap_schema.si_ad_creatorsName,
+ attr->a_vals, attr->a_nvals );
+ }
+ attr = attr_find( e->e_attrs, slap_schema.si_ad_modifiersName );
+ if ( attr )
+ {
+ attr_merge( cfe, slap_schema.si_ad_modifiersName,
+ attr->a_vals, attr->a_nvals );
+ }
+ attr = attr_find( e->e_attrs, slap_schema.si_ad_createTimestamp );
+ if (attr)
+ {
+ attr_merge( cfe, slap_schema.si_ad_createTimestamp,
+ attr->a_vals, attr->a_nvals );
+ }
+ attr = attr_find( e->e_attrs, slap_schema.si_ad_modifyTimestamp );
+ if (attr)
+ {
+ attr_merge( cfe, slap_schema.si_ad_modifyTimestamp,
+ attr->a_vals, attr->a_nvals );
+ }
if (cfe && bi && bi->bi_tool_entry_put &&
bi->bi_tool_entry_put( &cfb->cb_db, cfe, text ) != NOID ) {
entry_put_got_frontend++;