diff options
Diffstat (limited to 'src/responder')
-rw-r--r-- | src/responder/common/negcache.c | 14 | ||||
-rw-r--r-- | src/responder/common/negcache.h | 6 |
2 files changed, 20 insertions, 0 deletions
diff --git a/src/responder/common/negcache.c b/src/responder/common/negcache.c index 3e58c3e7f..2fa61af53 100644 --- a/src/responder/common/negcache.c +++ b/src/responder/common/negcache.c @@ -838,3 +838,17 @@ done: talloc_free(tmpctx); return ret; } + +/* Reset permanent negcache after checking the domains */ +errno_t sss_ncache_reset_repopulate_permanent(struct resp_ctx *rctx, + struct sss_nc_ctx *ncache) +{ + int ret; + + ret = sss_ncache_reset_permanent(ncache); + if (ret == EOK) { + ret = sss_ncache_prepopulate(ncache, rctx->cdb, rctx); + } + + return ret; +} diff --git a/src/responder/common/negcache.h b/src/responder/common/negcache.h index 00f979dbb..b96fbfda5 100644 --- a/src/responder/common/negcache.h +++ b/src/responder/common/negcache.h @@ -69,6 +69,8 @@ int sss_ncache_set_service_port(struct sss_nc_ctx *ctx, bool permanent, int sss_ncache_reset_permanent(struct sss_nc_ctx *ctx); +struct resp_ctx; + /* Set up the negative cache with values from filter_users and * filter_groups in the sssd.conf */ @@ -76,4 +78,8 @@ errno_t sss_ncache_prepopulate(struct sss_nc_ctx *ncache, struct confdb_ctx *cdb, struct resp_ctx *rctx); +/* Flush the negcache and then repopulate */ +errno_t sss_ncache_reset_repopulate_permanent(struct resp_ctx *rctx, + struct sss_nc_ctx *ncache); + #endif /* _NSS_NEG_CACHE_H_ */ |