Fixed slapd database open with real structure (ITS#5724)
Fixed slapd rewriting undefined filter (ITS#5731)
Added slapd GSSAPI refactoring (ITS#5369)
+ Added slapd private databases to be instantiated by global overlays (ITS#5735,ITS#5736)
Added slapd support for certificateListExactMatch from RFC4523 (ITS#5700)
Fixed slapd-bdb/hdb invalid db crash (ITS#5698)
+ Fixed slapo-chain/translucent back-config support (ITS#5736)
Added slapo-constraint parameter to allow LDAP URI constraints (ITS#5704)
Added slapo-constraint support for constraining rename (ITS#5703)
Added slapo-constraint support for relax control (ITS#5705)
LDAP_CH_RES,
LDAP_CH_ERR
} ldap_chain_status_t;
+
static BackendInfo *lback;
typedef struct ldap_chain_t {
"NAME 'olcChainDatabase' "
"DESC 'Chain remote server configuration' "
"AUXILIARY )",
- Cft_Misc, chaincfg, chain_ldadd },
+ Cft_Misc, olcDatabaseDummy, chain_ldadd },
{ NULL, 0, NULL }
};
}
}
+ ca->ca_private = on;
+
done:;
if ( rc != LDAP_SUCCESS ) {
(void)ldap_chain_db_destroy_one( ca->be, NULL );
ldap_chain_t *lc = NULL;
if ( lback == NULL ) {
- static BackendInfo lback2;
-
lback = backend_info( "ldap" );
if ( lback == NULL ) {
return 1;
}
-
- lback2 = *lback;
- lback2.bi_type = ldapchain.on_bi.bi_type;
- lback = &lback2;
}
lc = ch_malloc( sizeof( ldap_chain_t ) );
int
chain_initialize( void )
{
- int rc;
+ int rc;
+ const char *text;
/* Make sure we don't exceed the bits reserved for userland */
config_check_userland( CH_LAST );
"monitor_subsys_database_init: "
"missing suffix for %s\n",
rdnval, 0, 0 );
- return -1;
- }
- attr_merge( e, slap_schema.si_ad_namingContexts,
+ } else {
+ attr_merge( e, slap_schema.si_ad_namingContexts,
be->be_suffix, be->be_nsuffix );
- attr_merge( e_database, slap_schema.si_ad_namingContexts,
+ attr_merge( e_database, slap_schema.si_ad_namingContexts,
be->be_suffix, be->be_nsuffix );
+ }
}
(void)init_readOnly( mi, e, be->be_restrictops );
NULL, NULL, NULL, NULL }
};
+/* Need to no-op this keyword for dynamic config */
+ConfigTable olcDatabaseDummy[] = {
+ { "", "", 0, 0, 0, ARG_IGNORED,
+ NULL, "( OLcfgGlAt:13 NAME 'olcDatabase' "
+ "DESC 'The backend type for a database instance' "
+ "SUP olcBackend SINGLE-VALUE X-ORDERED 'SIBLINGS' )", NULL, NULL },
+ { NULL, NULL, 0, 0, 0, ARG_IGNORED }
+};
+
/* Routines to check if a child can be added to this type */
static ConfigLDAPadd cfAddSchema, cfAddInclude, cfAddDatabase,
cfAddBackend, cfAddModule, cfAddOverlay;
ConfigArgs *ca;
Entry *frontend;
Entry *config;
- int got_frontend;
+ int got_frontend;
int got_config;
} setup_cookie;
{
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;
}
}
}
+
+ 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 );
i = config_register_schema( ct, cf_ocs );
if ( i ) return i;
+ i = slap_str2ad( "olcDatabase", &olcDatabaseDummy[0].ad, &text );
+ if ( i ) return i;
+
/* setup olcRootPW to be base64-encoded when written in LDIF form;
* basically, we don't care if it fails */
i = slap_str2ad( "olcRootPW", &ad, &text );
extern slap_verbmasks *slap_ldap_response_code;
extern int slap_ldap_response_code_register( struct berval *bv, int err );
+extern ConfigTable olcDatabaseDummy[];
+
LDAP_END_DECL
#endif /* CONFIG_H */
{ NULL, NULL, 0, 0, 0, ARG_IGNORED }
};
-/* Need to no-op this keyword for dynamic config */
-static ConfigTable pcdummy[] = {
- { "", "", 0, 0, 0, ARG_IGNORED,
- NULL, "( OLcfgGlAt:13 NAME 'olcDatabase' "
- "DESC 'The backend type for a database instance' "
- "SUP olcBackend SINGLE-VALUE X-ORDERED 'SIBLINGS' )", NULL, NULL },
- { NULL, NULL, 0, 0, 0, ARG_IGNORED }
-};
-
static ConfigOCs pcocs[] = {
{ "( OLcfgOvOc:2.1 "
"NAME 'olcPcacheConfig' "
{ "( OLcfgOvOc:2.2 "
"NAME 'olcPcacheDatabase' "
"DESC 'Cache database configuration' "
- "AUXILIARY )", Cft_Misc, pcdummy, pc_ldadd },
+ "AUXILIARY )", Cft_Misc, olcDatabaseDummy, pc_ldadd },
{ NULL, 0, NULL }
};
code = config_register_schema( pccfg, pcocs );
if ( code ) return code;
- {
- const char *text;
- code = slap_str2ad( "olcDatabase", &pcdummy[0].ad, &text );
- if ( code ) return code;
- }
return overlay_register( &pcache );
}
{ NULL, NULL, 0, 0, 0, ARG_IGNORED }
};
-static ConfigTable transdummy[] = {
- { "", "", 0, 0, 0, ARG_IGNORED,
- NULL, "( OLcfgGlAt:13 NAME 'olcDatabase' "
- "DESC 'The backend type for a database instance' "
- "SUP olcBackend SINGLE-VALUE X-ORDERED 'SIBLINGS' )", NULL, NULL },
- { NULL, NULL, 0, 0, 0, ARG_IGNORED }
-};
-
static ConfigOCs translucentocs[] = {
{ "( OLcfgOvOc:14.1 "
"NAME 'olcTranslucentConfig' "
{ "( OLcfgOvOc:14.2 "
"NAME 'olcTranslucentDatabase' "
"DESC 'Translucent target database configuration' "
- "AUXILIARY )", Cft_Misc, transdummy, translucent_ldadd },
+ "AUXILIARY )", Cft_Misc, olcDatabaseDummy, translucent_ldadd },
{ NULL, 0, NULL }
};
/* for translucent_init() */