From ccdc549cd2540a19f4bff908555aebb2dc3b7bd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= Date: Tue, 7 Sep 2010 16:17:58 +0300 Subject: authdb: separate last access / login time and tweak the authdb a bit. --- squark-auth-ip.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'squark-auth-ip.c') diff --git a/squark-auth-ip.c b/squark-auth-ip.c index 6993e85..602969b 100644 --- a/squark-auth-ip.c +++ b/squark-auth-ip.c @@ -141,7 +141,7 @@ int main(int argc, char **argv) if (running < 0) { struct authdb_entry entry; void *token; - char buf1[64], buf2[64]; + char buf1[64], buf2[64], buf3[64]; if (ipaddr.any.sa_family == AF_UNSPEC) { fprintf(stderr, "IP-address not specified\n"); @@ -176,6 +176,7 @@ int main(int argc, char **argv) "Soft block mask: %016llx\n" "Hard block mask: %016llx\n" "Login time: %s" + "Last activity time: %s" "Override time: %s", ip.ptr, entry.p.login_name, @@ -187,8 +188,9 @@ int main(int argc, char **argv) entry.p.mac_address[5], entry.p.block_categories, entry.p.hard_block_categories, - entry.u.login_time ? ctime_r(&entry.u.login_time, buf1) : "\n", - entry.u.override_time ? ctime_r(&entry.u.override_time, buf2) : "\n"); + entry.p.login_time ? ctime_r(&entry.p.login_time, buf1) : "\n", + entry.last_activity_time ? ctime_r(&entry.last_activity_time, buf2) : "\n", + entry.override_time ? ctime_r(&entry.override_time, buf3) : "\n"); break; case DO_LOGOUT: if (authdb_check_login(token, &entry, username, now)) -- cgit v1.2.3