From: Pierangelo Masarati Date: Wed, 17 Nov 2004 21:38:14 +0000 (+0000) Subject: the caching database may need to inherit ACLs and limits from the proxy X-Git-Tag: OPENLDAP_REL_ENG_2_3_0ALPHA~282 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f1187e416567274a14ceab68b55a5769353c9d8e;p=openldap the caching database may need to inherit ACLs and limits from the proxy --- diff --git a/servers/slapd/overlays/pcache.c b/servers/slapd/overlays/pcache.c index 3b667e5380..ff3110726e 100644 --- a/servers/slapd/overlays/pcache.c +++ b/servers/slapd/overlays/pcache.c @@ -1726,6 +1726,12 @@ proxy_cache_open( } } + /* need to inherit something from the original database... */ + cm->db.be_def_limit = be->be_def_limit; + cm->db.be_limits = be->be_limits; + cm->db.be_acl = be->be_acl; + cm->db.be_dfltaccess = be->be_dfltaccess; + rc = backend_startup_one( &cm->db ); /* There is no runqueue in TOOL mode */ @@ -1762,6 +1768,10 @@ proxy_cache_close( query_manager *qm = cm->qm; int i, j, rc = 0; + /* cleanup stuff inherited from the original database... */ + cm->db.be_limits = NULL; + cm->db.be_acl = NULL; + if ( cm->db.bd_info->bi_db_close ) { rc = cm->db.bd_info->bi_db_close( &cm->db ); }