make sure frontend gets the {-1} (ITS#7016)

This commit is contained in:
Pierangelo Masarati 2011-08-16 22:17:43 -06:00
parent a66fb1630c
commit fb83bf08bc

View file

@ -7247,6 +7247,22 @@ config_tool_entry_put( BackendDB *be, Entry *e, struct berval *text )
return NOID;
}
} else {
if ( !strncmp( e->e_nname.bv_val +
STRLENOF( "olcDatabase" ), "=frontend",
STRLENOF( "=frontend" ) ) )
{
struct berval rdn, pdn, ndn;
dnParent( &e->e_nname, &pdn );
rdn.bv_val = ca.log;
rdn.bv_len = snprintf(rdn.bv_val, sizeof( ca.log ),
"%s=" SLAP_X_ORDERED_FMT "%s",
cfAd_database->ad_cname.bv_val, -1,
frontendDB->bd_info->bi_type );
build_new_dn( &ndn, &pdn, &rdn, NULL );
ber_memfree( e->e_name.bv_val );
e->e_name = ndn;
ber_bvreplace( &e->e_nname, &e->e_name );
}
entry_put_got_frontend++;
isFrontend = 1;
}