From 9e6d64a0adb7c1d98ac9c5ac358e65aaac91e45c Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Wed, 26 Jan 2005 09:53:29 +0000 Subject: [PATCH] move supported controls listing at backend startup; allow supported controls to be set/mucked in between --- servers/slapd/backend.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) 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; -- 2.39.5