From 281ad1251ced13931ddbf99671841ef87db6ec0a Mon Sep 17 00:00:00 2001 From: Rob Smart Date: Wed, 16 Sep 2009 13:34:14 +0100 Subject: updated the IAuthorizationService interface so that a message is passed back and can be displayed at the client when an avatar is denied access to a region --- .../Authorization/LocalAuthorizationServiceConnector.cs | 4 ++-- .../Authorization/RemoteAuthorizationServiceConnector.cs | 5 +++-- OpenSim/Region/Framework/Scenes/Scene.cs | 3 ++- 3 files changed, 7 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/LocalAuthorizationServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/LocalAuthorizationServiceConnector.cs index c52c257..e69613a 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/LocalAuthorizationServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/LocalAuthorizationServiceConnector.cs @@ -132,9 +132,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization } - public bool IsAuthorizedForRegion(string userID, string regionID) + public bool IsAuthorizedForRegion(string userID, string regionID, out string message) { - return m_AuthorizationService.IsAuthorizedForRegion(userID, regionID); + return m_AuthorizationService.IsAuthorizedForRegion(userID, regionID, out message); } } diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/RemoteAuthorizationServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/RemoteAuthorizationServiceConnector.cs index 9241851..a672f4f 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/RemoteAuthorizationServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/RemoteAuthorizationServiceConnector.cs @@ -117,11 +117,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization } - public bool IsAuthorizedForRegion(string userID, string regionID) + public bool IsAuthorizedForRegion(string userID, string regionID, out string message) { m_log.InfoFormat("[REMOTE AUTHORIZATION CONNECTOR]: IsAuthorizedForRegion checking {0} for region {1}", userID, regionID); bool isAuthorized = true; + message = String.Empty; // get the scene this call is being made for Scene scene = null; @@ -140,7 +141,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization { UserProfileData profile = scene.CommsManager.UserService.GetUserProfile(new UUID(userID)); isAuthorized = IsAuthorizedForRegion(userID, profile.FirstName, profile.SurName, - profile.Email, scene.RegionInfo.RegionName, regionID); + profile.Email, scene.RegionInfo.RegionName, regionID, out message); } else { diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 0c2f991..80f3e4d 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -3253,10 +3253,11 @@ namespace OpenSim.Region.Framework.Scenes if (AuthorizationService != null) { - if (!AuthorizationService.IsAuthorizedForRegion(agent.AgentID.ToString(), RegionInfo.RegionID.ToString())) + if (!AuthorizationService.IsAuthorizedForRegion(agent.AgentID.ToString(), RegionInfo.RegionID.ToString(),out reason)) { m_log.WarnFormat("[CONNECTION BEGIN]: Denied access to: {0} ({1} {2}) at {3} because the user does not have access to the region", agent.AgentID, agent.firstname, agent.lastname, RegionInfo.RegionName); + //reason = String.Format("You are not currently on the access list for {0}",RegionInfo.RegionName); return false; } } -- cgit v1.1 From 35260faead29c590bf01c1eb02130cfac22c38ad Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 16 Sep 2009 18:20:55 +0100 Subject: on iar save/load, let the user know if they put in the wrong password refactor GetUserInfo() to eliminate copypasta --- .../Inventory/Archiver/InventoryArchiverModule.cs | 39 ++++++++++------------ OpenSim/Region/Framework/Scenes/Scene.cs | 5 +-- 2 files changed, 18 insertions(+), 26 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs index 1937637..9f49da9 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs @@ -125,10 +125,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver { if (m_scenes.Count > 0) { - CachedUserInfo userInfo = GetUserInfo(firstName, lastName); - string md5PasswdHash = Util.Md5Hash(Util.Md5Hash(pass) + ":" + userInfo.UserProfile.PasswordSalt); - if (userInfo.UserProfile.PasswordHash != md5PasswdHash) - return false; + CachedUserInfo userInfo = GetUserInfo(firstName, lastName, pass); if (userInfo != null) { @@ -153,11 +150,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver { if (m_scenes.Count > 0) { - CachedUserInfo userInfo = GetUserInfo(firstName, lastName); - string md5PasswdHash = Util.Md5Hash(Util.Md5Hash(pass) + ":" + userInfo.UserProfile.PasswordSalt); - if (userInfo.UserProfile.PasswordHash != md5PasswdHash) - return false; - + CachedUserInfo userInfo = GetUserInfo(firstName, lastName, pass); if (userInfo != null) { @@ -182,11 +175,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver { if (m_scenes.Count > 0) { - CachedUserInfo userInfo = GetUserInfo(firstName, lastName); - string md5PasswdHash = Util.Md5Hash(Util.Md5Hash(pass) + ":" + userInfo.UserProfile.PasswordSalt); - if (userInfo.UserProfile.PasswordHash != md5PasswdHash) - return false; - + CachedUserInfo userInfo = GetUserInfo(firstName, lastName, pass); if (userInfo != null) { @@ -214,11 +203,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver { if (m_scenes.Count > 0) { - CachedUserInfo userInfo = GetUserInfo(firstName, lastName); - string md5PasswdHash = Util.Md5Hash(Util.Md5Hash(pass) + ":" + userInfo.UserProfile.PasswordSalt); - if (userInfo.UserProfile.PasswordHash != md5PasswdHash) - return false; - + CachedUserInfo userInfo = GetUserInfo(firstName, lastName, pass); if (userInfo != null) { @@ -251,7 +236,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver if (cmdparams.Length < 6) { m_log.Error( - "[INVENTORY ARCHIVER]: usage is load iar []"); + "[INVENTORY ARCHIVER]: usage is load iar []"); return; } @@ -282,7 +267,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver if (cmdparams.Length < 5) { m_log.Error( - "[INVENTORY ARCHIVER]: usage is save iar []"); + "[INVENTORY ARCHIVER]: usage is save iar []"); return; } @@ -334,8 +319,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver /// /// /// + /// User password /// - protected CachedUserInfo GetUserInfo(string firstName, string lastName) + protected CachedUserInfo GetUserInfo(string firstName, string lastName, string pass) { CachedUserInfo userInfo = m_aScene.CommsManager.UserProfileCacheService.GetUserDetails(firstName, lastName); if (null == userInfo) @@ -345,6 +331,15 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver firstName, lastName); return null; } + + string md5PasswdHash = Util.Md5Hash(Util.Md5Hash(pass) + ":" + userInfo.UserProfile.PasswordSalt); + if (userInfo.UserProfile.PasswordHash != md5PasswdHash) + { + m_log.ErrorFormat( + "[INVENTORY ARCHIVER]: Password for user {0} {1} incorrect. Please try again.", + firstName, lastName); + return null; + } return userInfo; } diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 0c2f991..a8028a6 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -994,9 +994,7 @@ namespace OpenSim.Region.Framework.Scenes // Loop it if (m_frame == Int32.MaxValue) - m_frame = 0; - - + m_frame = 0; otherMS = Environment.TickCount; // run through all entities looking for updates (slow) @@ -1017,7 +1015,6 @@ namespace OpenSim.Region.Framework.Scenes m_sceneGraph.UpdateEntities(); } - // run through entities that have scheduled themselves for // updates looking for updates(faster) if (m_frame % m_update_entitiesquick == 0) -- cgit v1.1 From 077d01c2255009a1e47e8bed42375ce81b770ef9 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 16 Sep 2009 18:44:55 +0100 Subject: switch default physics engine to ODE and default meshmerizer to Meshmerizer in code and in OpenSim.ini.example --- OpenSim/Region/Application/ConfigurationLoader.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Application/ConfigurationLoader.cs b/OpenSim/Region/Application/ConfigurationLoader.cs index c3e7b86..21edcc5 100644 --- a/OpenSim/Region/Application/ConfigurationLoader.cs +++ b/OpenSim/Region/Application/ConfigurationLoader.cs @@ -305,8 +305,8 @@ namespace OpenSim config.Set("region_info_source", "filesystem"); config.Set("gridmode", false); - config.Set("physics", "basicphysics"); - config.Set("meshing", "ZeroMesher"); + config.Set("physics", "OpenDynamicsEngine"); + config.Set("meshing", "Meshmerizer"); config.Set("physical_prim", true); config.Set("see_into_this_sim_from_neighbor", true); config.Set("serverside_object_permissions", false); -- cgit v1.1