summaryrefslogtreecommitdiffstats
path: root/source
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
commitf4e898b6224fd82d9805da771ef6040065de7b12 (patch)
tree5e325256abe4ecf470736bf2504181993c0f6232 /source
parentab8d41053347a5b342ed5b59a0b0dd4983ca91e6 (diff)
downloadsamba-f4e898b6224fd82d9805da771ef6040065de7b12.tar.gz
samba-f4e898b6224fd82d9805da771ef6040065de7b12.tar.xz
samba-f4e898b6224fd82d9805da771ef6040065de7b12.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.
Diffstat (limited to 'source')
-rw-r--r--source/lib/time.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/lib/time.c b/source/lib/time.c
index 9fe69eb45ac..762c775ea2c 100644
--- a/source/lib/time.c
+++ b/source/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;