aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMelanie2009-09-16 17:57:31 +0100
committerMelanie2009-09-16 17:57:31 +0100
commit5068404505d037d1dca93b38ba69b87822531302 (patch)
tree42048b7a9a3a127f482fdf028117e8977fe75fb5 /OpenSim
parentAdd the migration for scoping grid data (diff)
parentswitch default physics engine to ODE and default meshmerizer to Meshmerizer i... (diff)
downloadopensim-SC_OLD-5068404505d037d1dca93b38ba69b87822531302.zip
opensim-SC_OLD-5068404505d037d1dca93b38ba69b87822531302.tar.gz
opensim-SC_OLD-5068404505d037d1dca93b38ba69b87822531302.tar.bz2
opensim-SC_OLD-5068404505d037d1dca93b38ba69b87822531302.tar.xz
Merge branch 'master' of ssh://melanie@opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Application/ConfigurationLoader.cs4
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs39
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/LocalAuthorizationServiceConnector.cs4
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/RemoteAuthorizationServiceConnector.cs5
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs8
-rw-r--r--OpenSim/Server/Handlers/Authorization/AuthorizationServerPostHandler.cs3
-rw-r--r--OpenSim/Services/AuthorizationService/AuthorizationService.cs3
-rw-r--r--OpenSim/Services/Connectors/Authorization/AuthorizationServiceConnector.cs4
-rw-r--r--OpenSim/Services/Interfaces/IAuthorizationService.cs2
9 files changed, 35 insertions, 37 deletions
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
305 config.Set("region_info_source", "filesystem"); 305 config.Set("region_info_source", "filesystem");
306 306
307 config.Set("gridmode", false); 307 config.Set("gridmode", false);
308 config.Set("physics", "basicphysics"); 308 config.Set("physics", "OpenDynamicsEngine");
309 config.Set("meshing", "ZeroMesher"); 309 config.Set("meshing", "Meshmerizer");
310 config.Set("physical_prim", true); 310 config.Set("physical_prim", true);
311 config.Set("see_into_this_sim_from_neighbor", true); 311 config.Set("see_into_this_sim_from_neighbor", true);
312 config.Set("serverside_object_permissions", false); 312 config.Set("serverside_object_permissions", false);
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
125 { 125 {
126 if (m_scenes.Count > 0) 126 if (m_scenes.Count > 0)
127 { 127 {
128 CachedUserInfo userInfo = GetUserInfo(firstName, lastName); 128 CachedUserInfo userInfo = GetUserInfo(firstName, lastName, pass);
129 string md5PasswdHash = Util.Md5Hash(Util.Md5Hash(pass) + ":" + userInfo.UserProfile.PasswordSalt);
130 if (userInfo.UserProfile.PasswordHash != md5PasswdHash)
131 return false;
132 129
133 if (userInfo != null) 130 if (userInfo != null)
134 { 131 {
@@ -153,11 +150,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
153 { 150 {
154 if (m_scenes.Count > 0) 151 if (m_scenes.Count > 0)
155 { 152 {
156 CachedUserInfo userInfo = GetUserInfo(firstName, lastName); 153 CachedUserInfo userInfo = GetUserInfo(firstName, lastName, pass);
157 string md5PasswdHash = Util.Md5Hash(Util.Md5Hash(pass) + ":" + userInfo.UserProfile.PasswordSalt);
158 if (userInfo.UserProfile.PasswordHash != md5PasswdHash)
159 return false;
160
161 154
162 if (userInfo != null) 155 if (userInfo != null)
163 { 156 {
@@ -182,11 +175,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
182 { 175 {
183 if (m_scenes.Count > 0) 176 if (m_scenes.Count > 0)
184 { 177 {
185 CachedUserInfo userInfo = GetUserInfo(firstName, lastName); 178 CachedUserInfo userInfo = GetUserInfo(firstName, lastName, pass);
186 string md5PasswdHash = Util.Md5Hash(Util.Md5Hash(pass) + ":" + userInfo.UserProfile.PasswordSalt);
187 if (userInfo.UserProfile.PasswordHash != md5PasswdHash)
188 return false;
189
190 179
191 if (userInfo != null) 180 if (userInfo != null)
192 { 181 {
@@ -214,11 +203,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
214 { 203 {
215 if (m_scenes.Count > 0) 204 if (m_scenes.Count > 0)
216 { 205 {
217 CachedUserInfo userInfo = GetUserInfo(firstName, lastName); 206 CachedUserInfo userInfo = GetUserInfo(firstName, lastName, pass);
218 string md5PasswdHash = Util.Md5Hash(Util.Md5Hash(pass) + ":" + userInfo.UserProfile.PasswordSalt);
219 if (userInfo.UserProfile.PasswordHash != md5PasswdHash)
220 return false;
221
222 207
223 if (userInfo != null) 208 if (userInfo != null)
224 { 209 {
@@ -251,7 +236,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
251 if (cmdparams.Length < 6) 236 if (cmdparams.Length < 6)
252 { 237 {
253 m_log.Error( 238 m_log.Error(
254 "[INVENTORY ARCHIVER]: usage is load iar <first name> <last name> <inventory path> <password> [<load file path>]"); 239 "[INVENTORY ARCHIVER]: usage is load iar <first name> <last name> <inventory path> <user password> [<load file path>]");
255 return; 240 return;
256 } 241 }
257 242
@@ -282,7 +267,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
282 if (cmdparams.Length < 5) 267 if (cmdparams.Length < 5)
283 { 268 {
284 m_log.Error( 269 m_log.Error(
285 "[INVENTORY ARCHIVER]: usage is save iar <first name> <last name> <inventory path> <password> [<save file path>]"); 270 "[INVENTORY ARCHIVER]: usage is save iar <first name> <last name> <inventory path> <user password> [<save file path>]");
286 return; 271 return;
287 } 272 }
288 273
@@ -334,8 +319,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
334 /// </summary> 319 /// </summary>
335 /// <param name="firstName"></param> 320 /// <param name="firstName"></param>
336 /// <param name="lastName"></param> 321 /// <param name="lastName"></param>
322 /// <param name="pass">User password</param>
337 /// <returns></returns> 323 /// <returns></returns>
338 protected CachedUserInfo GetUserInfo(string firstName, string lastName) 324 protected CachedUserInfo GetUserInfo(string firstName, string lastName, string pass)
339 { 325 {
340 CachedUserInfo userInfo = m_aScene.CommsManager.UserProfileCacheService.GetUserDetails(firstName, lastName); 326 CachedUserInfo userInfo = m_aScene.CommsManager.UserProfileCacheService.GetUserDetails(firstName, lastName);
341 if (null == userInfo) 327 if (null == userInfo)
@@ -345,6 +331,15 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
345 firstName, lastName); 331 firstName, lastName);
346 return null; 332 return null;
347 } 333 }
334
335 string md5PasswdHash = Util.Md5Hash(Util.Md5Hash(pass) + ":" + userInfo.UserProfile.PasswordSalt);
336 if (userInfo.UserProfile.PasswordHash != md5PasswdHash)
337 {
338 m_log.ErrorFormat(
339 "[INVENTORY ARCHIVER]: Password for user {0} {1} incorrect. Please try again.",
340 firstName, lastName);
341 return null;
342 }
348 343
349 return userInfo; 344 return userInfo;
350 } 345 }
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
132 132
133 } 133 }
134 134
135 public bool IsAuthorizedForRegion(string userID, string regionID) 135 public bool IsAuthorizedForRegion(string userID, string regionID, out string message)
136 { 136 {
137 return m_AuthorizationService.IsAuthorizedForRegion(userID, regionID); 137 return m_AuthorizationService.IsAuthorizedForRegion(userID, regionID, out message);
138 } 138 }
139 139
140 } 140 }
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
117 117
118 } 118 }
119 119
120 public bool IsAuthorizedForRegion(string userID, string regionID) 120 public bool IsAuthorizedForRegion(string userID, string regionID, out string message)
121 { 121 {
122 m_log.InfoFormat("[REMOTE AUTHORIZATION CONNECTOR]: IsAuthorizedForRegion checking {0} for region {1}", userID, regionID); 122 m_log.InfoFormat("[REMOTE AUTHORIZATION CONNECTOR]: IsAuthorizedForRegion checking {0} for region {1}", userID, regionID);
123 123
124 bool isAuthorized = true; 124 bool isAuthorized = true;
125 message = String.Empty;
125 126
126 // get the scene this call is being made for 127 // get the scene this call is being made for
127 Scene scene = null; 128 Scene scene = null;
@@ -140,7 +141,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization
140 { 141 {
141 UserProfileData profile = scene.CommsManager.UserService.GetUserProfile(new UUID(userID)); 142 UserProfileData profile = scene.CommsManager.UserService.GetUserProfile(new UUID(userID));
142 isAuthorized = IsAuthorizedForRegion(userID, profile.FirstName, profile.SurName, 143 isAuthorized = IsAuthorizedForRegion(userID, profile.FirstName, profile.SurName,
143 profile.Email, scene.RegionInfo.RegionName, regionID); 144 profile.Email, scene.RegionInfo.RegionName, regionID, out message);
144 } 145 }
145 else 146 else
146 { 147 {
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 0c2f991..d8478a2 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -994,9 +994,7 @@ namespace OpenSim.Region.Framework.Scenes
994 994
995 // Loop it 995 // Loop it
996 if (m_frame == Int32.MaxValue) 996 if (m_frame == Int32.MaxValue)
997 m_frame = 0; 997 m_frame = 0;
998
999
1000 998
1001 otherMS = Environment.TickCount; 999 otherMS = Environment.TickCount;
1002 // run through all entities looking for updates (slow) 1000 // run through all entities looking for updates (slow)
@@ -1017,7 +1015,6 @@ namespace OpenSim.Region.Framework.Scenes
1017 m_sceneGraph.UpdateEntities(); 1015 m_sceneGraph.UpdateEntities();
1018 } 1016 }
1019 1017
1020
1021 // run through entities that have scheduled themselves for 1018 // run through entities that have scheduled themselves for
1022 // updates looking for updates(faster) 1019 // updates looking for updates(faster)
1023 if (m_frame % m_update_entitiesquick == 0) 1020 if (m_frame % m_update_entitiesquick == 0)
@@ -3253,10 +3250,11 @@ namespace OpenSim.Region.Framework.Scenes
3253 3250
3254 if (AuthorizationService != null) 3251 if (AuthorizationService != null)
3255 { 3252 {
3256 if (!AuthorizationService.IsAuthorizedForRegion(agent.AgentID.ToString(), RegionInfo.RegionID.ToString())) 3253 if (!AuthorizationService.IsAuthorizedForRegion(agent.AgentID.ToString(), RegionInfo.RegionID.ToString(),out reason))
3257 { 3254 {
3258 m_log.WarnFormat("[CONNECTION BEGIN]: Denied access to: {0} ({1} {2}) at {3} because the user does not have access to the region", 3255 m_log.WarnFormat("[CONNECTION BEGIN]: Denied access to: {0} ({1} {2}) at {3} because the user does not have access to the region",
3259 agent.AgentID, agent.firstname, agent.lastname, RegionInfo.RegionName); 3256 agent.AgentID, agent.firstname, agent.lastname, RegionInfo.RegionName);
3257 //reason = String.Format("You are not currently on the access list for {0}",RegionInfo.RegionName);
3260 return false; 3258 return false;
3261 } 3259 }
3262 } 3260 }
diff --git a/OpenSim/Server/Handlers/Authorization/AuthorizationServerPostHandler.cs b/OpenSim/Server/Handlers/Authorization/AuthorizationServerPostHandler.cs
index fb079d3..69acd25 100644
--- a/OpenSim/Server/Handlers/Authorization/AuthorizationServerPostHandler.cs
+++ b/OpenSim/Server/Handlers/Authorization/AuthorizationServerPostHandler.cs
@@ -60,7 +60,8 @@ namespace OpenSim.Server.Handlers.Authorization
60 XmlSerializer xs = new XmlSerializer(typeof (AuthorizationRequest)); 60 XmlSerializer xs = new XmlSerializer(typeof (AuthorizationRequest));
61 AuthorizationRequest Authorization = (AuthorizationRequest) xs.Deserialize(request); 61 AuthorizationRequest Authorization = (AuthorizationRequest) xs.Deserialize(request);
62 62
63 bool authorized = m_AuthorizationService.IsAuthorizedForRegion(Authorization.ID, Authorization.RegionID); 63 string message = String.Empty;
64 bool authorized = m_AuthorizationService.IsAuthorizedForRegion(Authorization.ID, Authorization.RegionID,out message);
64 65
65 AuthorizationResponse result = new AuthorizationResponse(authorized, Authorization.ID + " has been authorized"); 66 AuthorizationResponse result = new AuthorizationResponse(authorized, Authorization.ID + " has been authorized");
66 67
diff --git a/OpenSim/Services/AuthorizationService/AuthorizationService.cs b/OpenSim/Services/AuthorizationService/AuthorizationService.cs
index c795ba0..d658368 100644
--- a/OpenSim/Services/AuthorizationService/AuthorizationService.cs
+++ b/OpenSim/Services/AuthorizationService/AuthorizationService.cs
@@ -48,8 +48,9 @@ namespace OpenSim.Services.AuthorizationService
48 m_log.Info("[AUTHORIZATION CONNECTOR]: Local Authorization service enabled"); 48 m_log.Info("[AUTHORIZATION CONNECTOR]: Local Authorization service enabled");
49 } 49 }
50 50
51 public bool IsAuthorizedForRegion(string userID, string regionID) 51 public bool IsAuthorizedForRegion(string userID, string regionID, out string message)
52 { 52 {
53 message = "Authorized";
53 return true; 54 return true;
54 } 55 }
55 } 56 }
diff --git a/OpenSim/Services/Connectors/Authorization/AuthorizationServiceConnector.cs b/OpenSim/Services/Connectors/Authorization/AuthorizationServiceConnector.cs
index 98309f1..3167352 100644
--- a/OpenSim/Services/Connectors/Authorization/AuthorizationServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Authorization/AuthorizationServiceConnector.cs
@@ -88,7 +88,7 @@ namespace OpenSim.Services.Connectors
88 m_ResponseOnFailure = responseOnFailure; 88 m_ResponseOnFailure = responseOnFailure;
89 } 89 }
90 90
91 public bool IsAuthorizedForRegion(string userID, string firstname, string surname, string email, string regionName, string regionID) 91 public bool IsAuthorizedForRegion(string userID, string firstname, string surname, string email, string regionName, string regionID, out string message)
92 { 92 {
93 // do a remote call to the authorization server specified in the AuthorizationServerURI 93 // do a remote call to the authorization server specified in the AuthorizationServerURI
94 m_log.InfoFormat("[AUTHORIZATION CONNECTOR]: IsAuthorizedForRegion checking {0} at remote server {1}", userID, m_ServerURI); 94 m_log.InfoFormat("[AUTHORIZATION CONNECTOR]: IsAuthorizedForRegion checking {0} at remote server {1}", userID, m_ServerURI);
@@ -105,10 +105,12 @@ namespace OpenSim.Services.Connectors
105 catch (Exception e) 105 catch (Exception e)
106 { 106 {
107 m_log.WarnFormat("[AUTHORIZATION CONNECTOR]: Unable to send authorize {0} for region {1} error thrown during comms with remote server. Reason: {2}", userID, regionID, e.Message); 107 m_log.WarnFormat("[AUTHORIZATION CONNECTOR]: Unable to send authorize {0} for region {1} error thrown during comms with remote server. Reason: {2}", userID, regionID, e.Message);
108 message="";
108 return m_ResponseOnFailure; 109 return m_ResponseOnFailure;
109 } 110 }
110 111
111 m_log.DebugFormat("[AUTHORIZATION CONNECTOR] response from remote service was {0}", response.Message); 112 m_log.DebugFormat("[AUTHORIZATION CONNECTOR] response from remote service was {0}", response.Message);
113 message = response.Message;
112 114
113 return response.IsAuthorized; 115 return response.IsAuthorized;
114 } 116 }
diff --git a/OpenSim/Services/Interfaces/IAuthorizationService.cs b/OpenSim/Services/Interfaces/IAuthorizationService.cs
index 91afa9a..c5d577a 100644
--- a/OpenSim/Services/Interfaces/IAuthorizationService.cs
+++ b/OpenSim/Services/Interfaces/IAuthorizationService.cs
@@ -40,7 +40,7 @@ namespace OpenSim.Services.Interfaces
40 // This method returns a simple true false indicating 40 // This method returns a simple true false indicating
41 // whether or not a user has access to the region 41 // whether or not a user has access to the region
42 // 42 //
43 bool IsAuthorizedForRegion(string userID, string regionID); 43 bool IsAuthorizedForRegion(string userID, string regionID, out string message);
44 44
45 } 45 }
46 46