OpenLDAP 2.4 Change Log
OpenLDAP 2.4.25 Engineering
+ Fixed slapd add objectclasses in order (ITS#6837)
+ Fixed slapd-ldap chain cn=config support (ITS#6837)
Build Environment
Fixed libldap/lberl/util if/else usage (ITS#6832)
Fixed Windows odbc32 detection (ITS#6125)
{ "( OLcfgOvOc:3.2 "
"NAME 'olcChainDatabase' "
"DESC 'Chain remote server configuration' "
- "AUXILIARY )",
+ "SUP olcLDAPConfig )",
Cft_Misc, olcDatabaseDummy, chain_ldadd },
{ NULL, 0, NULL }
};
ConfigOCs co, *cop;
ObjectClass **sups;
+ for ( sups = oc->soc_sups; sups && *sups; sups++ ) {
+ if ( count_oc( *sups, copp, nocs ) ) {
+ return -1;
+ }
+ }
+
co.co_name = &oc->soc_cname;
cop = avl_find( CfOcTree, &co, CfOc_cmp );
if ( cop ) {
}
}
- for ( sups = oc->soc_sups; sups && *sups; sups++ ) {
- if ( count_oc( *sups, copp, nocs ) ) {
- return -1;
- }
- }
-
return 0;
}
static ConfigOCs **
count_ocs( Attribute *oc_at, int *nocs )
{
- int i;
+ int i, j;
ConfigOCs **colst = NULL;
*nocs = 0;
- for ( i = 0; !BER_BVISNULL( &oc_at->a_nvals[i] ); i++ )
- /* count attrs */ ;
-
- for ( ; i--; ) {
+ for ( i = oc_at->a_numvals; i--; ) {
ObjectClass *oc = oc_bvfind( &oc_at->a_nvals[i] );
assert( oc != NULL );
}
}
+ /* invert order */
+ i = 0;
+ j = *nocs - 1;
+ while ( i < j ) {
+ ConfigOCs *tmp = colst[i];
+ colst[i] = colst[j];
+ colst[j] = tmp;
+ i++; j--;
+ }
+
return colst;
}