From: Pierangelo Masarati Date: Wed, 26 Jan 2005 08:57:39 +0000 (+0000) Subject: inherit controls X-Git-Tag: OPENLDAP_REL_ENG_2_3_BP~249 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c67ce5f2e334296463abb6f2b0b3e283b036eb0c;p=openldap inherit controls --- diff --git a/servers/slapd/back-relay/init.c b/servers/slapd/back-relay/init.c index 9cb0a91a75..7ae96aecbb 100644 --- a/servers/slapd/back-relay/init.c +++ b/servers/slapd/back-relay/init.c @@ -97,10 +97,20 @@ relay_back_db_open( Backend *be ) if ( !BER_BVISNULL( &ri->ri_realsuffix ) ) { ri->ri_bd = select_backend( &ri->ri_realsuffix, 0, 1 ); + /* must be there: it was during config! */ assert( ri->ri_bd ); - /* FIXME: (somehow) copy supported controls ? */ + /* inherit controls */ + if ( ri->ri_bd ) { + be->be_controls = ldap_charray_dup( ri->ri_bd->be_controls ); + } + + } else { + /* inherit all? */ + if ( frontendDB->be_controls ) { + be->be_controls = ldap_charray_dup( frontendDB->be_controls ); + } } return 0;