summaryrefslogtreecommitdiff
path: root/source3/auth
diff options
context:
space:
mode:
Diffstat (limited to 'source3/auth')
-rw-r--r--source3/auth/auth_sam.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source3/auth/auth_sam.c b/source3/auth/auth_sam.c
index 50ce9065fd..e8018eb13d 100644
--- a/source3/auth/auth_sam.c
+++ b/source3/auth/auth_sam.c
@@ -93,9 +93,11 @@ static BOOL logon_hours_ok(struct samu *sampass)
bitmask = 1 << (bitpos % 8);
if (! (hours[bitpos/8] & bitmask)) {
- DEBUG(1,("logon_hours_ok: Account for user %s not allowed to logon at this time (%s).\n",
- pdb_get_username(sampass),
- asctime(localtime(&lasttime)) ));
+ struct tm *t = localtime(&lasttime);
+ DEBUG(1, ("logon_hours_ok: Account for user %s not allowed to "
+ "logon at this time (%s).\n",
+ pdb_get_username(sampass),
+ t ? asctime(t) : "INVALID TIME"));
return False;
}