diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-05-26 08:02:20 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:56:19 -0500 |
commit | 39a236883ee4015980ff3d3cab8a8e5fec858502 (patch) | |
tree | 6d20f1364cf4f1dd0cc9e2237bfc9c96ce301186 /source4/lib/time.c | |
parent | 0eb7588cc4d1fa423430e61ccbef19ec2453e164 (diff) | |
download | samba-39a236883ee4015980ff3d3cab8a8e5fec858502.tar.gz samba-39a236883ee4015980ff3d3cab8a8e5fec858502.tar.bz2 samba-39a236883ee4015980ff3d3cab8a8e5fec858502.zip |
r904: - fixed account expiry testing in auth_sam
- added printf style format attribute checking to samdb varargs fns
- fix nt_time_to_unix() for zero and -1 times
(This used to be commit 41f9b144f9fe77e92f960bd11b1df397a63fd2d5)
Diffstat (limited to 'source4/lib/time.c')
-rw-r--r-- | source4/lib/time.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source4/lib/time.c b/source4/lib/time.c index e95d3a8d17..5fd8aa3081 100644 --- a/source4/lib/time.c +++ b/source4/lib/time.c @@ -91,6 +91,12 @@ It's originally in "100ns units since jan 1st 1601" ****************************************************************************/ time_t nt_time_to_unix(NTTIME nt) { + if (nt == 0) { + return 0; + } + if (nt == -1LL) { + return (time_t)-1; + } nt += 1000*1000*10/2; nt /= 1000*1000*10; nt -= TIME_FIXUP_CONSTANT; |