summaryrefslogtreecommitdiffstats
path: root/source/nsswitch/winbindd_cache.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2002-01-11 10:05:34 +0000
committerAndrew Tridgell <tridge@samba.org>2002-01-11 10:05:34 +0000
commit116c0a0e3baa6a100a816f1ff2722782941ac3dc (patch)
tree0ceaeb1a2fddb918a781b126065e62d0e1c44625 /source/nsswitch/winbindd_cache.c
parentec73d26c7f9a2bbd4b91e9c22850e032b91666e2 (diff)
downloadsamba-116c0a0e3baa6a100a816f1ff2722782941ac3dc.tar.gz
samba-116c0a0e3baa6a100a816f1ff2722782941ac3dc.tar.xz
samba-116c0a0e3baa6a100a816f1ff2722782941ac3dc.zip
force the time difference in cache comparisons to be unsigned to cope
with the local machine time changing
Diffstat (limited to 'source/nsswitch/winbindd_cache.c')
-rw-r--r--source/nsswitch/winbindd_cache.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/nsswitch/winbindd_cache.c b/source/nsswitch/winbindd_cache.c
index 15964f2cce1..70b730e0b91 100644
--- a/source/nsswitch/winbindd_cache.c
+++ b/source/nsswitch/winbindd_cache.c
@@ -173,9 +173,12 @@ static BOOL wcache_server_down(struct winbindd_domain *domain)
static void refresh_sequence_number(struct winbindd_domain *domain, BOOL force)
{
NTSTATUS status;
+ unsigned time_diff;
+
+ time_diff = time(NULL) - domain->last_seq_check;
/* see if we have to refetch the domain sequence number */
- if (!force && (time(NULL) - domain->last_seq_check < lp_winbind_cache_time())) {
+ if (!force && (time_diff < lp_winbind_cache_time())) {
return;
}