svn commit: samba r20692 - in branches: SAMBA_3_0/source/lib SAMBA_3_0_24/source/lib

jra at samba.org jra at samba.org
Fri Jan 12 02:12:16 GMT 2007


Author: jra
Date: 2007-01-12 02:12:15 +0000 (Fri, 12 Jan 2007)
New Revision: 20692

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=20692

Log:
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.

Modified:
   branches/SAMBA_3_0/source/lib/time.c
   branches/SAMBA_3_0_24/source/lib/time.c


Changeset:
Modified: branches/SAMBA_3_0/source/lib/time.c
===================================================================
--- branches/SAMBA_3_0/source/lib/time.c	2007-01-12 01:57:31 UTC (rev 20691)
+++ branches/SAMBA_3_0/source/lib/time.c	2007-01-12 02:12:15 UTC (rev 20692)
@@ -1112,7 +1112,7 @@
 		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;

Modified: branches/SAMBA_3_0_24/source/lib/time.c
===================================================================
--- branches/SAMBA_3_0_24/source/lib/time.c	2007-01-12 01:57:31 UTC (rev 20691)
+++ branches/SAMBA_3_0_24/source/lib/time.c	2007-01-12 02:12:15 UTC (rev 20692)
@@ -1112,7 +1112,7 @@
 		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;



More information about the samba-cvs mailing list