From 6d2826110259083208a130587ac107411b1cec4e Mon Sep 17 00:00:00 2001 From: onefang Date: Fri, 19 Jul 2019 13:00:52 +1000 Subject: Tweak the login logging a bit, especially for impersonations. --- .../AuthenticationService/PasswordAuthenticationService.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/OpenSim/Services/AuthenticationService/PasswordAuthenticationService.cs b/OpenSim/Services/AuthenticationService/PasswordAuthenticationService.cs index 0204699..aef3e9f 100644 --- a/OpenSim/Services/AuthenticationService/PasswordAuthenticationService.cs +++ b/OpenSim/Services/AuthenticationService/PasswordAuthenticationService.cs @@ -87,6 +87,7 @@ namespace OpenSim.Services.AuthenticationService if (!data.Data.ContainsKey("passwordHash") || !data.Data.ContainsKey("passwordSalt")) { + m_log.DebugFormat("[AUTH SERVICE]: No credentials."); return String.Empty; } @@ -109,9 +110,12 @@ namespace OpenSim.Services.AuthenticationService int impersonateFlag = 1 << 6; if ((user.UserFlags & impersonateFlag) == 0) + { + m_log.DebugFormat("[AUTH SERVICE]: Not trying impersonation {0} {1}.", user.UserFlags, impersonateFlag); return String.Empty; + } - m_log.DebugFormat("[PASS AUTH]: Attempting impersonation"); + m_log.DebugFormat("[PASS AUTH]: Attempting impersonation."); List accounts = m_UserAccountService.GetUserAccountsWhere(UUID.Zero, "UserLevel >= 200"); if (accounts == null || accounts.Count == 0) @@ -134,7 +138,7 @@ namespace OpenSim.Services.AuthenticationService if (data.Data["passwordHash"].ToString() == hashed) { - m_log.DebugFormat("[PASS AUTH]: {0} {1} impersonating {2}, proceeding with login", a.FirstName, a.LastName, principalID); + m_log.InfoFormat("[PASS AUTH]: {0} {1} impersonating {2}, proceeding with login", a.FirstName, a.LastName, principalID); realID = a.PrincipalID; return GetToken(principalID, lifetime); } @@ -146,7 +150,7 @@ namespace OpenSim.Services.AuthenticationService // } } - m_log.DebugFormat("[PASS AUTH]: Impersonation of {0} failed", principalID); + m_log.InfoFormat("[PASS AUTH]: Impersonation of {0} failed", principalID); return String.Empty; } } -- cgit v1.1