mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-02-03 20:40:05 -05:00
allow private databases to be instantiated by global overlays (ITS#5735)
This commit is contained in:
parent
e533f34107
commit
4e276f882c
1 changed files with 14 additions and 5 deletions
|
|
@ -3253,7 +3253,7 @@ typedef struct setup_cookie {
|
|||
ConfigArgs *ca;
|
||||
Entry *frontend;
|
||||
Entry *config;
|
||||
int got_frontend;
|
||||
int got_frontend;
|
||||
int got_config;
|
||||
} setup_cookie;
|
||||
|
||||
|
|
@ -3262,15 +3262,18 @@ config_ldif_resp( Operation *op, SlapReply *rs )
|
|||
{
|
||||
if ( rs->sr_type == REP_SEARCH ) {
|
||||
setup_cookie *sc = op->o_callback->sc_private;
|
||||
struct berval pdn;
|
||||
|
||||
sc->cfb->cb_got_ldif = 1;
|
||||
/* Does the frontend exist? */
|
||||
if ( !sc->got_frontend ) {
|
||||
if ( !strncmp( rs->sr_entry->e_nname.bv_val,
|
||||
"olcDatabase", STRLENOF( "olcDatabase" ))) {
|
||||
"olcDatabase", STRLENOF( "olcDatabase" )))
|
||||
{
|
||||
if ( strncmp( rs->sr_entry->e_nname.bv_val +
|
||||
STRLENOF( "olcDatabase" ), "={-1}frontend",
|
||||
STRLENOF( "={-1}frontend" ))) {
|
||||
STRLENOF( "={-1}frontend" )))
|
||||
{
|
||||
struct berval rdn;
|
||||
int i = op->o_noop;
|
||||
sc->ca->be = frontendDB;
|
||||
|
|
@ -3293,13 +3296,19 @@ config_ldif_resp( Operation *op, SlapReply *rs )
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
dnParent( &rs->sr_entry->e_nname, &pdn );
|
||||
|
||||
/* Does the configDB exist? */
|
||||
if ( sc->got_frontend && !sc->got_config &&
|
||||
!strncmp( rs->sr_entry->e_nname.bv_val,
|
||||
"olcDatabase", STRLENOF( "olcDatabase" ))) {
|
||||
"olcDatabase", STRLENOF( "olcDatabase" )) &&
|
||||
dn_match( &config_rdn, &pdn ) )
|
||||
{
|
||||
if ( strncmp( rs->sr_entry->e_nname.bv_val +
|
||||
STRLENOF( "olcDatabase" ), "={0}config",
|
||||
STRLENOF( "={0}config" ))) {
|
||||
STRLENOF( "={0}config" )))
|
||||
{
|
||||
struct berval rdn;
|
||||
int i = op->o_noop;
|
||||
sc->ca->be = LDAP_STAILQ_FIRST( &backendDB );
|
||||
|
|
|
|||
Loading…
Reference in a new issue