summaryrefslogtreecommitdiffstats
path: root/src/responder/common
diff options
context:
space:
mode:
authorPetr Cech <pcech@redhat.com>2016-04-19 07:35:26 -0400
committerLukas Slebodnik <lslebodn@redhat.com>2016-04-20 20:07:21 +0200
commit85a9d31cb955fa2d6c6ec45b4bf04b00118829fb (patch)
tree5d6a8a22cf1aabbd9c9f03656266f36d71934649 /src/responder/common
parentee4be57409e157af0a57228605ef8e07f6d4fa1b (diff)
downloadsssd-85a9d31cb955fa2d6c6ec45b4bf04b00118829fb.tar.gz
sssd-85a9d31cb955fa2d6c6ec45b4bf04b00118829fb.tar.xz
sssd-85a9d31cb955fa2d6c6ec45b4bf04b00118829fb.zip
NEGCACHE: Removing of condition for ttl = -1
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 <lslebodn@redhat.com>
Diffstat (limited to 'src/responder/common')
-rw-r--r--src/responder/common/negcache.c6
1 files changed, 0 insertions, 6 deletions
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') {