From d8f6faa89e23482f7359c1f99066d2c306950fef Mon Sep 17 00:00:00 2001 From: Melanie Date: Fri, 1 Jun 2012 23:04:13 +0200 Subject: [PATCH] Fix impersonation, it got broken in a merge --- .../PasswordAuthenticationService.cs | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/OpenSim/Services/AuthenticationService/PasswordAuthenticationService.cs b/OpenSim/Services/AuthenticationService/PasswordAuthenticationService.cs index 0d7ced9fd7..769c3c2477 100644 --- a/OpenSim/Services/AuthenticationService/PasswordAuthenticationService.cs +++ b/OpenSim/Services/AuthenticationService/PasswordAuthenticationService.cs @@ -103,6 +103,8 @@ namespace OpenSim.Services.AuthenticationService if ((user.UserFlags & impersonateFlag) == 0) return String.Empty; + m_log.DebugFormat("[PASS AUTH]: Attempting impersonation"); + List accounts = m_UserAccountService.GetUserAccountsWhere(UUID.Zero, "UserLevel >= 200"); if (accounts == null || accounts.Count == 0) return String.Empty; @@ -117,6 +119,8 @@ namespace OpenSim.Services.AuthenticationService continue; } +// m_log.DebugFormat("[PASS AUTH]: Trying {0}", data.PrincipalID); + hashed = Util.Md5Hash(password + ":" + data.Data["passwordSalt"].ToString()); @@ -125,13 +129,12 @@ namespace OpenSim.Services.AuthenticationService m_log.DebugFormat("[PASS AUTH]: {0} {1} impersonating {2}, proceeding with login", a.FirstName, a.LastName, principalID); return GetToken(principalID, lifetime); } - else - { - m_log.DebugFormat( - "[AUTH SERVICE]: Salted hash {0} of given password did not match salted hash of {1} for PrincipalID {2}. Authentication failure.", - hashed, data.Data["passwordHash"], principalID); - return String.Empty; - } +// else +// { +// m_log.DebugFormat( +// "[AUTH SERVICE]: Salted hash {0} of given password did not match salted hash of {1} for PrincipalID {2}. Authentication failure.", +// hashed, data.Data["passwordHash"], data.PrincipalID); +// } } m_log.DebugFormat("[PASS AUTH]: Impersonation of {0} failed", principalID);