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)
committerKarolin Seeger <kseeger@samba.org>
Mon, 5 Mar 2012 19:54:19 +0000 (20:54 +0100)
Found and fix reported by Micha Lenk <micha@lenk.info>. Thanks !
(cherry picked from commit 1e4761d05978b7a495d121acc1deaa7049f3911c)
(cherry picked from commit b5215ca58c7501e093030c527f82078c8b315b88)

source3/winbindd/winbindd_cache.c

index cd0bb67cad4be54dcb4bd3d7cf19fd12516611ba..c5442b22cf30874a6ecb6b99b3f0d73fc67d61c3 100644 (file)
@@ -4709,7 +4709,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;
                }