From 2ab5b8594ee062922554f2d0d698bb194867025b Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 12 Aug 2005 00:05:17 +0000 Subject: r9252: 2 type fixes from Luke Mewburn . Bugid #2934. Jeremy. (This used to be commit c63ad85b8c1aedd04a65e46c27a6e2661093847a) --- source3/auth/auth_sam.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source3/auth') diff --git a/source3/auth/auth_sam.c b/source3/auth/auth_sam.c index 023e441e24..bb4df707ef 100644 --- a/source3/auth/auth_sam.c +++ b/source3/auth/auth_sam.c @@ -78,6 +78,7 @@ static BOOL logon_hours_ok(SAM_ACCOUNT *sampass) /* In logon hours first bit is Sunday from 12AM to 1AM */ const uint8 *hours; struct tm *utctime; + time_t lasttime; uint8 bitmask, bitpos; hours = pdb_get_hours(sampass); @@ -86,7 +87,8 @@ static BOOL logon_hours_ok(SAM_ACCOUNT *sampass) return True; } - utctime = localtime(&smb_last_time.tv_sec); + lasttime = (time_t)smb_last_time.tv_sec; + utctime = localtime(&lasttime); /* find the corresponding byte and bit */ bitpos = (utctime->tm_wday * 24 + utctime->tm_hour) % 168; -- cgit