From ae3fa7e4e515da08755076f6b1cbb98597e67685 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 13 Oct 2018 11:39:03 +0200 Subject: [PATCH] winbindd_cache: Fix timeout calculation for sid<->name cache Bug: https://bugzilla.samba.org/show_bug.cgi?id=13662 Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison (cherry picked from commit fb573c682353daf5b343b6a0f4832dcbc96ebc57) --- source3/winbindd/winbindd_cache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source3/winbindd/winbindd_cache.c b/source3/winbindd/winbindd_cache.c index af67aa3b0cf..b0644d38761 100644 --- a/source3/winbindd/winbindd_cache.c +++ b/source3/winbindd/winbindd_cache.c @@ -1749,7 +1749,7 @@ static void wcache_name_to_sid_fn(const struct dom_sid *sid, *state->sid = *sid; *state->type = type; - state->found = (state->offline || (timeout < time(NULL))); + state->found = (state->offline || (timeout > time(NULL))); } static NTSTATUS wcache_name_to_sid(struct winbindd_domain *domain, @@ -1884,7 +1884,7 @@ static void wcache_sid_to_name_fn(const char *domain, const char *name, return; } *state->type = type; - state->found = (state->offline || (timeout < time(NULL))); + state->found = (state->offline || (timeout > time(NULL))); } static NTSTATUS wcache_sid_to_name(struct winbindd_domain *domain, -- 2.11.0