From 148e2d55fa4dcf6e87ffce5c67f2ca2ea9e88a08 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Fri, 10 Jul 2009 18:40:37 +0000 Subject: * minor: Make GridCommon.ini.example refer to inventory service rather than asset where appropriate * Send debug level notice to console if a user fails authentication --- .../Communications/Services/LoginService.cs | 36 ++++++++++++++++------ .../Inventory/InventoryServiceConnector.cs | 2 +- bin/config-include/GridCommon.ini.example | 5 +-- 3 files changed, 31 insertions(+), 12 deletions(-) diff --git a/OpenSim/Framework/Communications/Services/LoginService.cs b/OpenSim/Framework/Communications/Services/LoginService.cs index a9be197..9709975 100644 --- a/OpenSim/Framework/Communications/Services/LoginService.cs +++ b/OpenSim/Framework/Communications/Services/LoginService.cs @@ -311,37 +311,55 @@ namespace OpenSim.Framework.Communications.Services { Hashtable requestData = (Hashtable)request.Params[0]; - bool GoodLogin = false; - userProfile = GetTheUser(firstname, lastname); if (userProfile == null) { - m_log.Info("[LOGIN END]: XMLRPC Could not find a profile for " + firstname + " " + lastname); + m_log.Debug("[LOGIN END]: XMLRPC Could not find a profile for " + firstname + " " + lastname); + return false; } else { if (requestData.Contains("passwd")) { string passwd = (string)requestData["passwd"]; - GoodLogin = AuthenticateUser(userProfile, passwd); + bool authenticated = AuthenticateUser(userProfile, passwd); + + if (!authenticated) + m_log.DebugFormat("[LOGIN END]: XMLRPC User {0} {1} failed password authentication", + firstname, lastname); + + return authenticated; } - if (!GoodLogin && (requestData.Contains("web_login_key"))) + + if (requestData.Contains("web_login_key")) { try { UUID webloginkey = new UUID((string)requestData["web_login_key"]); - GoodLogin = AuthenticateUser(userProfile, webloginkey); + bool authenticated = AuthenticateUser(userProfile, webloginkey); + + if (!authenticated) + m_log.DebugFormat("[LOGIN END]: XMLRPC User {0} {1} failed web login key authentication", + firstname, lastname); + + return authenticated; } catch (Exception e) { - m_log.InfoFormat( - "[LOGIN END]: XMLRPC Bad web_login_key: {0} for user {1} {2}, exception {3}", + m_log.DebugFormat( + "[LOGIN END]: XMLRPC Bad web_login_key: {0} for user {1} {2}, exception {3}", requestData["web_login_key"], firstname, lastname, e); + + return false; } } + + m_log.DebugFormat( + "[LOGIN END]: XMLRPC login request for {0} {1} contained neither a password nor a web login key", + firstname, lastname); } - return GoodLogin; + return false; } protected virtual bool TryAuthenticateLLSDLogin(string firstname, string lastname, string passwd, out UserProfileData userProfile) diff --git a/OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs b/OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs index 093ce92..50ce3ea 100644 --- a/OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs +++ b/OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs @@ -68,7 +68,7 @@ namespace OpenSim.Services.Connectors if (inventoryConfig == null) { m_log.Error("[INVENTORY CONNECTOR]: InventoryService missing from OpenSim.ini"); - throw new Exception("Inventory connector init error"); + throw new Exception("InventoryService missing from OpenSim.ini"); } string serviceURI = inventoryConfig.GetString("InventoryServerURI", diff --git a/bin/config-include/GridCommon.ini.example b/bin/config-include/GridCommon.ini.example index ff324ce..3a8ec35 100644 --- a/bin/config-include/GridCommon.ini.example +++ b/bin/config-include/GridCommon.ini.example @@ -8,11 +8,12 @@ ; AssetServerURI = "http://myassetserver.com:8003" + [InventoryService] ; - ; change this to your grid-wide asset server + ; change this to your grid-wide inventory server ; - InventoryServerURI = "http://myassetserver.com:8004" + InventoryServerURI = "http://myinventoryserver.com:8004" [Modules] -- cgit v1.1