From f8916d7e9bda129a57143d769f7eb1f596614c80 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Wed, 25 Jan 2017 08:22:54 +0100 Subject: git-serve: Save last SSH login date and IP address In addition to logging the last login date and IP address on the web interface, store the time stamp and IP address of the last SSH login in the database. This simplifies user banning if one of the new SSH interface features, such as the voting mechanism implemented in 7ee2fdd (git-serve: Add support for (un-)voting, 2017-01-23), is abused. Signed-off-by: Lukas Fleischer --- schema/aur-schema.sql | 2 ++ 1 file changed, 2 insertions(+) (limited to 'schema/aur-schema.sql') diff --git a/schema/aur-schema.sql b/schema/aur-schema.sql index 13e3fd94..b0663eb5 100644 --- a/schema/aur-schema.sql +++ b/schema/aur-schema.sql @@ -38,6 +38,8 @@ CREATE TABLE Users ( PGPKey VARCHAR(40) NULL DEFAULT NULL, LastLogin BIGINT UNSIGNED NOT NULL DEFAULT 0, LastLoginIPAddress VARCHAR(45) NULL DEFAULT NULL, + LastSSHLogin BIGINT UNSIGNED NOT NULL DEFAULT 0, + LastSSHLoginIPAddress VARCHAR(45) NULL DEFAULT NULL, InactivityTS BIGINT UNSIGNED NOT NULL DEFAULT 0, RegistrationTS TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, CommentNotify TINYINT(1) NOT NULL DEFAULT 1, -- cgit v1.2.3-24-g4f1b