summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-01-12 02:12:15 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:17:03 -0500
commit5a2585416c10216bd1097e7e369476dce780f776 (patch)
treef4be2b30f7378bf2ad8b3570463db5e338e90d93 /source3/lib
parentfc8605735470df188a2915b6109c1c01a20bc6ac (diff)
downloadsamba-5a2585416c10216bd1097e7e369476dce780f776.tar.gz
samba-5a2585416c10216bd1097e7e369476dce780f776.tar.bz2
samba-5a2585416c10216bd1097e7e369476dce780f776.zip
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)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/time.c2
1 files changed, 1 insertions, 1 deletions
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;