Fix bug #8521 - winbindd cache timeout expiry test was reversed
authorJeremy Allison <jra@samba.org>
Wed, 12 Oct 2011 16:43:18 +0000 (09:43 -0700)
committerJeremy Allison <jra@samba.org>
Wed, 12 Oct 2011 17:29:30 +0000 (19:29 +0200)
Found and fix reported by Micha Lenk <micha@lenk.info>. Thanks !

source3/winbindd/winbindd_cache.c

index 2bb4df9736b55c0a0c430ba5b21f0ea77e4c3946..620b8588aa06891dd883e6a2e32ade7aff24e412 100644 (file)
@@ -4807,7 +4807,7 @@ bool wcache_fetch_ndr(TALLOC_CTX *mem_ctx, struct winbindd_domain *domain,
                        goto fail;
                }
                entry_timeout = BVAL(data.dptr, 4);
-               if (entry_timeout > time(NULL)) {
+               if (time(NULL) > entry_timeout) {
                        DEBUG(10, ("Entry has timed out\n"));
                        goto fail;
                }