Changeset

2084:9d43095d915f

mod_log_auth: Include username, if known
author Kim Alvefur <zash@zash.se>
date Tue, 15 Mar 2016 16:46:44 +0100
parents 2083:fed0a71a5e68
children 2085:8cb8004091f8
files mod_log_auth/mod_log_auth.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_log_auth/mod_log_auth.lua	Tue Mar 15 16:46:02 2016 +0100
+++ b/mod_log_auth/mod_log_auth.lua	Tue Mar 15 16:46:44 2016 +0100
@@ -3,7 +3,7 @@
 
 if mode == "failure" or mode == "all" then
 	module:hook("authentication-failure", function (event)
-		module:log("info", "Failed authentication attempt (%s) from IP: %s", event.condition or "unknown-condition", event.session.ip or "?");
+		module:log("info", "Failed authentication attempt (%s) for user %s from IP: %s", event.condition or "unknown-condition", event.session.username or "?", event.session.ip or "?");
 	end);
 end