From 39a236883ee4015980ff3d3cab8a8e5fec858502 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 26 May 2004 08:02:20 +0000 Subject: 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) --- source4/lib/time.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source4/lib') 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; -- cgit