From 5a2585416c10216bd1097e7e369476dce780f776 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 12 Jan 2007 02:12:15 +0000 Subject: r20692: Fix bug found by Guenther - Just try to log on in offline mode without the fix: all accounts are expired, although they are set to never expire in the PAC/info3. NTTIME "Never" needs to get (time_t) -1. We were casting a uint64 to time_t before comparing, and we should have been doing it the other way around. Guenther please check this fixes things. Jeremy. (This used to be commit f4e898b6224fd82d9805da771ef6040065de7b12) --- source3/lib/time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/lib') diff --git a/source3/lib/time.c b/source3/lib/time.c index 9fe69eb45a..762c775ea2 100644 --- a/source3/lib/time.c +++ b/source3/lib/time.c @@ -1112,7 +1112,7 @@ struct timespec nt_time_to_unix_timespec(NTTIME *nt) return ret; } - if (((time_t)d) >= TIME_T_MAX) { + if (d >= (uint64)TIME_T_MAX) { ret.tv_sec = TIME_T_MAX; ret.tv_nsec = 0; return ret; -- cgit