winbindd_cache: Fix timeout calculation for sid<->name cache
authorVolker Lendecke <vl@samba.org>
Sat, 13 Oct 2018 09:39:03 +0000 (11:39 +0200)
committerJeremy Allison <jra@samba.org>
Tue, 16 Oct 2018 16:00:10 +0000 (18:00 +0200)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/winbindd/winbindd_cache.c

index 2f3bac7587b12ea83f8a8b12458f6b472c7bf3f5..be3e5ffc2ade180545a6fc944190e1081e12b858 100644 (file)
@@ -1749,7 +1749,7 @@ static void wcache_name_to_sid_fn(const struct dom_sid *sid,
 
        *state->sid = *sid;
        *state->type = type;
 
        *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,
 }
 
 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;
                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,
 }
 
 static NTSTATUS wcache_sid_to_name(struct winbindd_domain *domain,