diff options
author | Jeremy Allison <jra@samba.org> | 2005-08-12 00:05:17 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:00:29 -0500 |
commit | c63ad85b8c1aedd04a65e46c27a6e2661093847a (patch) | |
tree | 368b2b5210d2fee990fd276cf77bbaa7f7895a05 /source/auth/auth_sam.c | |
parent | 3ec6fc8d1e34c344f59b8c1a22f3bab556e7fa07 (diff) | |
download | samba-c63ad85b8c1aedd04a65e46c27a6e2661093847a.tar.gz |
r9252: 2 type fixes from Luke Mewburn <lukem@NetBSD.org>. Bugid #2934.
Jeremy.
Diffstat (limited to 'source/auth/auth_sam.c')
-rw-r--r-- | source/auth/auth_sam.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/auth/auth_sam.c b/source/auth/auth_sam.c index 023e441e241..bb4df707ef7 100644 --- a/source/auth/auth_sam.c +++ b/source/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; |