From 85a9d31cb955fa2d6c6ec45b4bf04b00118829fb Mon Sep 17 00:00:00 2001 From: Petr Cech Date: Tue, 19 Apr 2016 07:35:26 -0400 Subject: NEGCACHE: Removing of condition for ttl = -1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If ttl = -1 then function sss_ncache_check_str() returns EEXIST without checking negcache. This behaviour is out of logic. We use ttl = 0 for permanent caching. Reviewed-by: Lukáš Slebodník --- src/responder/common/negcache.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'src/responder/common') diff --git a/src/responder/common/negcache.c b/src/responder/common/negcache.c index 5b0517ceb..1617bf8c5 100644 --- a/src/responder/common/negcache.c +++ b/src/responder/common/negcache.c @@ -97,12 +97,6 @@ static int sss_ncache_check_str(struct sss_nc_ctx *ctx, char *str, int ttl) goto done; } - if (ttl == -1) { - /* a negative ttl means: never expires */ - ret = EEXIST; - goto done; - } - errno = 0; timestamp = strtoull((const char *)data.dptr, &ep, 10); if (errno != 0 || *ep != '\0') { -- cgit