Skip to content

Commit db29d31

Browse files
committed
allow overriding globally set OIDCCacheType back to shm in vhosts
Signed-off-by: Hans Zandbelt <hans.zandbelt@openidc.com>
1 parent 0d4d507 commit db29d31

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1+
09/06/2024
2+
- allow overriding globally set OIDCCacheType back to shm in vhosts
3+
14
09/05/2024
25
- fix OIDCCacheShmMax min/max settings; see #1260; thanks @bbartke
6+
- bump to 2.4.16.3dev
37

48
08/30/2024
59
- release 2.4.16.2

src/cfg/cache.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ static void oidc_cfg_cache_redis_merge_server_config(oidc_cfg_t *c, oidc_cfg_t *
344344
* generic
345345
*/
346346
void oidc_cfg_cache_create_server_config(oidc_cfg_t *c) {
347-
c->cache.impl = &oidc_cache_shm;
347+
c->cache.impl = NULL;
348348
c->cache.cfg = NULL;
349349
c->cache.encrypt = OIDC_CONFIG_POS_INT_UNSET;
350350
oidc_cfg_cache_shm_create_server_config(c);
@@ -358,7 +358,7 @@ void oidc_cfg_cache_create_server_config(oidc_cfg_t *c) {
358358
}
359359

360360
void oidc_cfg_cache_merge_server_config(oidc_cfg_t *c, oidc_cfg_t *base, oidc_cfg_t *add) {
361-
c->cache.impl = (add->cache.impl != &oidc_cache_shm) ? add->cache.impl : base->cache.impl;
361+
c->cache.impl = (add->cache.impl != NULL) ? add->cache.impl : base->cache.impl;
362362
c->cache.encrypt = add->cache.encrypt != OIDC_CONFIG_POS_INT_UNSET ? add->cache.encrypt : base->cache.encrypt;
363363
c->cache.cfg = NULL;
364364
oidc_cfg_cache_shm_merge_server_config(c, base, add);

src/cfg/cfg.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -858,6 +858,8 @@ oidc_cache_mutex_t *oidc_cfg_refresh_mutex_get(oidc_cfg_t *cfg) {
858858
}
859859

860860
int oidc_cfg_post_config(oidc_cfg_t *cfg, server_rec *s) {
861+
if (cfg->cache.impl == NULL)
862+
cfg->cache.impl = &oidc_cache_shm;
861863
if (cfg->cache.impl->post_config != NULL) {
862864
if (cfg->cache.impl->post_config(s) != OK)
863865
return HTTP_INTERNAL_SERVER_ERROR;

0 commit comments

Comments
 (0)