summaryrefslogtreecommitdiff
path: root/source3/nsswitch
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
commit13059beb245b9d088d523473bbc0d564ed88ed69 (patch)
treeb33c5caed9144853e8d76476d3d3cbda9de47055 /source3/nsswitch
parent35623dac5431cd947f28b653597b675260331a63 (diff)
downloadsamba-13059beb245b9d088d523473bbc0d564ed88ed69.tar.gz
samba-13059beb245b9d088d523473bbc0d564ed88ed69.tar.bz2
samba-13059beb245b9d088d523473bbc0d564ed88ed69.zip
force the time difference in cache comparisons to be unsigned to cope
with the local machine time changing (This used to be commit 116c0a0e3baa6a100a816f1ff2722782941ac3dc)
Diffstat (limited to 'source3/nsswitch')
-rw-r--r--source3/nsswitch/winbindd_cache.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/nsswitch/winbindd_cache.c b/source3/nsswitch/winbindd_cache.c
index 15964f2cce..70b730e0b9 100644
--- a/source3/nsswitch/winbindd_cache.c
+++ b/source3/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;
}