diff options
author | Petr Cech <pcech@redhat.com> | 2016-04-22 04:27:47 -0400 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2016-05-11 12:49:45 +0200 |
commit | 39d36216a1692eee6cc5359f6c7ccaa7789be76d (patch) | |
tree | 41aca8c466b35959ba9f9302b4f943b23e55bc87 /src/responder/nss | |
parent | 73dd89c3fb361dab43b4802510f4c64d282dbde1 (diff) | |
download | sssd-39d36216a1692eee6cc5359f6c7ccaa7789be76d.tar.gz sssd-39d36216a1692eee6cc5359f6c7ccaa7789be76d.tar.xz sssd-39d36216a1692eee6cc5359f6c7ccaa7789be76d.zip |
NEGCACHE: Adding timeout to struct sss_nc_ctx
It adds timeout of negative cache to handling
struct sss_nc_ctx.
There is one change in API of negatice cache:
* int sss_ncache_init(TALLOC_CTX *memctx,
uint32_t timeout, <----- new
struct sss_nc_ctx **_ctx);
There is also one new function in common/responder:
* errno_t responder_get_neg_timeout_from_confdb(struct confdb_ctx *cdb,
uint32_t *ncache_timeout);
Resolves:
https://fedorahosted.org/sssd/ticket/2317
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Diffstat (limited to 'src/responder/nss')
-rw-r--r-- | src/responder/nss/nsssrv.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/responder/nss/nsssrv.c b/src/responder/nss/nsssrv.c index d8eff7968..5dfee5a32 100644 --- a/src/responder/nss/nsssrv.c +++ b/src/responder/nss/nsssrv.c @@ -416,6 +416,7 @@ int nss_process_init(TALLOC_CTX *mem_ctx, enum idmap_error_code err; int hret; int fd_limit; + uint32_t neg_timeout; nss_cmds = get_nss_cmds(); @@ -440,7 +441,10 @@ int nss_process_init(TALLOC_CTX *mem_ctx, goto fail; } - ret = sss_ncache_init(rctx, &nctx->ncache); + ret = responder_get_neg_timeout_from_confdb(cdb, &neg_timeout); + if (ret != EOK) goto fail; + + ret = sss_ncache_init(rctx, neg_timeout, &nctx->ncache); if (ret != EOK) { DEBUG(SSSDBG_FATAL_FAILURE, "fatal error initializing negative cache\n"); |