mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-21 06:14:40 -05:00
Fix autoca schema init
Wait for core.schema to get loaded
This commit is contained in:
parent
44a3653d90
commit
cff264c6e1
1 changed files with 18 additions and 13 deletions
|
|
@ -964,6 +964,24 @@ autoca_db_open(
|
|||
if (slapMode & SLAP_TOOL_MODE)
|
||||
return 0;
|
||||
|
||||
if ( ! *aca_attr2[0].ad ) {
|
||||
int i, code;
|
||||
const char *text;
|
||||
|
||||
for ( i=0; aca_attr2[i].at; i++ ) {
|
||||
code = slap_str2ad( aca_attr2[i].at, aca_attr2[i].ad, &text );
|
||||
if ( code ) return code;
|
||||
}
|
||||
|
||||
/* Schema may not be loaded, ignore if missing */
|
||||
slap_str2ad( "ipHostNumber", &ad_ipaddr, &text );
|
||||
|
||||
for ( i=0; aca_ocs[i].ot; i++ ) {
|
||||
code = register_oc( aca_ocs[i].ot, aca_ocs[i].oc, 0 );
|
||||
if ( code ) return code;
|
||||
}
|
||||
}
|
||||
|
||||
thrctx = ldap_pvt_thread_pool_context();
|
||||
connection_fake_init2( &conn, &opbuf, thrctx, 0 );
|
||||
op = &opbuf.ob_op;
|
||||
|
|
@ -1069,19 +1087,6 @@ int autoca_initialize() {
|
|||
if ( code ) return code;
|
||||
}
|
||||
|
||||
for ( i=0; aca_attr2[i].at; i++ ) {
|
||||
code = slap_str2ad( aca_attr2[i].at, aca_attr2[i].ad, &text );
|
||||
if ( code ) return code;
|
||||
}
|
||||
|
||||
/* Schema may not be loaded, ignore if missing */
|
||||
slap_str2ad( "ipHostNumber", &ad_ipaddr, &text );
|
||||
|
||||
for ( i=0; aca_ocs[i].ot; i++ ) {
|
||||
code = register_oc( aca_ocs[i].ot, aca_ocs[i].oc, 0 );
|
||||
if ( code ) return code;
|
||||
}
|
||||
|
||||
return overlay_register( &autoca );
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue