From: Pierangelo Masarati Date: Wed, 26 Jan 2005 09:53:29 +0000 (+0000) Subject: move supported controls listing at backend startup; allow supported controls to be... X-Git-Tag: OPENLDAP_REL_ENG_2_3_BP~244 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9e6d64a0adb7c1d98ac9c5ac358e65aaac91e45c;p=openldap move supported controls listing at backend startup; allow supported controls to be set/mucked in between --- diff --git a/servers/slapd/backend.c b/servers/slapd/backend.c index 032a816567..62426a13c5 100644 --- a/servers/slapd/backend.c +++ b/servers/slapd/backend.c @@ -185,6 +185,20 @@ int backend_startup_one(Backend *be) rc, 0, 0 ); } } + + /* back-relay takes care of itself; so may do other */ + if ( be->be_controls == NULL ) { + BackendInfo *bi = be->bd_info; + + if ( overlay_is_over( be ) ) { + bi = ((slap_overinfo *)be->bd_info->bi_private)->oi_orig; + } + + if ( bi->bi_controls ) { + be->be_controls = ldap_charray_dup( bi->bi_controls ); + } + } + return rc; } @@ -504,10 +518,6 @@ backend_db_init( be->bd_info = bi; - if ( bi->bi_controls ) { - be->be_controls = ldap_charray_dup( bi->bi_controls ); - } - be->be_def_limit = frontendDB->be_def_limit; be->be_dfltaccess = frontendDB->be_dfltaccess;