diff options
Diffstat (limited to '')
10 files changed, 45 insertions, 206 deletions
diff --git a/OpenSim/Client/Linden/LLProxyLoginModule.cs b/OpenSim/Client/Linden/LLProxyLoginModule.cs index 9075f15..14ce682 100644 --- a/OpenSim/Client/Linden/LLProxyLoginModule.cs +++ b/OpenSim/Client/Linden/LLProxyLoginModule.cs | |||
@@ -60,21 +60,6 @@ namespace OpenSim.Client.Linden | |||
60 | m_port = port; | 60 | m_port = port; |
61 | } | 61 | } |
62 | 62 | ||
63 | protected bool RegionLoginsEnabled | ||
64 | { | ||
65 | get | ||
66 | { | ||
67 | if (m_firstScene != null) | ||
68 | { | ||
69 | return m_firstScene.SceneGridService.RegionLoginsEnabled; | ||
70 | } | ||
71 | else | ||
72 | { | ||
73 | return false; | ||
74 | } | ||
75 | } | ||
76 | } | ||
77 | |||
78 | protected List<Scene> m_scenes = new List<Scene>(); | 63 | protected List<Scene> m_scenes = new List<Scene>(); |
79 | protected Scene m_firstScene; | 64 | protected Scene m_firstScene; |
80 | 65 | ||
@@ -239,67 +224,53 @@ namespace OpenSim.Client.Linden | |||
239 | agentData.child = false; | 224 | agentData.child = false; |
240 | } | 225 | } |
241 | 226 | ||
242 | if (!RegionLoginsEnabled) | 227 | bool success = false; |
243 | { | 228 | string denyMess = ""; |
244 | m_log.InfoFormat( | ||
245 | "[CLIENT]: Denying access for user {0} {1} because region login is currently disabled", | ||
246 | agentData.firstname, agentData.lastname); | ||
247 | 229 | ||
248 | Hashtable respdata = new Hashtable(); | 230 | Scene scene; |
249 | respdata["success"] = "FALSE"; | 231 | if (TryGetRegion(regionHandle, out scene)) |
250 | respdata["reason"] = "region login currently disabled"; | ||
251 | resp.Value = respdata; | ||
252 | } | ||
253 | else | ||
254 | { | 232 | { |
255 | bool success = false; | 233 | if (scene.RegionInfo.EstateSettings.IsBanned(agentData.AgentID)) |
256 | string denyMess = ""; | 234 | { |
257 | 235 | denyMess = "User is banned from this region"; | |
258 | Scene scene; | 236 | m_log.InfoFormat( |
259 | if (TryGetRegion(regionHandle, out scene)) | 237 | "[CLIENT]: Denying access for user {0} {1} because user is banned", |
238 | agentData.firstname, agentData.lastname); | ||
239 | } | ||
240 | else | ||
260 | { | 241 | { |
261 | if (scene.RegionInfo.EstateSettings.IsBanned(agentData.AgentID)) | 242 | string reason; |
243 | if (scene.NewUserConnection(agentData, (uint)TeleportFlags.ViaLogin, out reason)) | ||
262 | { | 244 | { |
263 | denyMess = "User is banned from this region"; | 245 | success = true; |
264 | m_log.InfoFormat( | ||
265 | "[CLIENT]: Denying access for user {0} {1} because user is banned", | ||
266 | agentData.firstname, agentData.lastname); | ||
267 | } | 246 | } |
268 | else | 247 | else |
269 | { | 248 | { |
270 | string reason; | 249 | denyMess = String.Format("Login refused by region: {0}", reason); |
271 | if (scene.NewUserConnection(agentData, (uint)TeleportFlags.ViaLogin, out reason)) | 250 | m_log.InfoFormat( |
272 | { | 251 | "[CLIENT]: Denying access for user {0} {1} because user connection was refused by the region", |
273 | success = true; | 252 | agentData.firstname, agentData.lastname); |
274 | } | ||
275 | else | ||
276 | { | ||
277 | denyMess = String.Format("Login refused by region: {0}", reason); | ||
278 | m_log.InfoFormat( | ||
279 | "[CLIENT]: Denying access for user {0} {1} because user connection was refused by the region", | ||
280 | agentData.firstname, agentData.lastname); | ||
281 | } | ||
282 | } | 253 | } |
283 | |||
284 | } | ||
285 | else | ||
286 | { | ||
287 | denyMess = "Region not found"; | ||
288 | } | 254 | } |
289 | 255 | ||
290 | if (success) | 256 | } |
291 | { | 257 | else |
292 | Hashtable respdata = new Hashtable(); | 258 | { |
293 | respdata["success"] = "TRUE"; | 259 | denyMess = "Region not found"; |
294 | resp.Value = respdata; | 260 | } |
295 | } | 261 | |
296 | else | 262 | if (success) |
297 | { | 263 | { |
298 | Hashtable respdata = new Hashtable(); | 264 | Hashtable respdata = new Hashtable(); |
299 | respdata["success"] = "FALSE"; | 265 | respdata["success"] = "TRUE"; |
300 | respdata["reason"] = denyMess; | 266 | resp.Value = respdata; |
301 | resp.Value = respdata; | 267 | } |
302 | } | 268 | else |
269 | { | ||
270 | Hashtable respdata = new Hashtable(); | ||
271 | respdata["success"] = "FALSE"; | ||
272 | respdata["reason"] = denyMess; | ||
273 | resp.Value = respdata; | ||
303 | } | 274 | } |
304 | } | 275 | } |
305 | catch (Exception e) | 276 | catch (Exception e) |
diff --git a/OpenSim/Client/Linden/LLStandaloneLoginModule.cs b/OpenSim/Client/Linden/LLStandaloneLoginModule.cs index 8047f74..e51eace 100644 --- a/OpenSim/Client/Linden/LLStandaloneLoginModule.cs +++ b/OpenSim/Client/Linden/LLStandaloneLoginModule.cs | |||
@@ -56,21 +56,6 @@ namespace OpenSim.Client.Linden | |||
56 | protected bool authenticate; | 56 | protected bool authenticate; |
57 | protected string welcomeMessage; | 57 | protected string welcomeMessage; |
58 | 58 | ||
59 | public bool RegionLoginsEnabled | ||
60 | { | ||
61 | get | ||
62 | { | ||
63 | if (m_firstScene != null) | ||
64 | { | ||
65 | return m_firstScene.SceneGridService.RegionLoginsEnabled; | ||
66 | } | ||
67 | else | ||
68 | { | ||
69 | return false; | ||
70 | } | ||
71 | } | ||
72 | } | ||
73 | |||
74 | protected LLStandaloneLoginService m_loginService; | 59 | protected LLStandaloneLoginService m_loginService; |
75 | 60 | ||
76 | #region IRegionModule Members | 61 | #region IRegionModule Members |
diff --git a/OpenSim/Client/Linden/LLStandaloneLoginService.cs b/OpenSim/Client/Linden/LLStandaloneLoginService.cs index 122110d..9ab043a 100644 --- a/OpenSim/Client/Linden/LLStandaloneLoginService.cs +++ b/OpenSim/Client/Linden/LLStandaloneLoginService.cs | |||
@@ -202,20 +202,15 @@ namespace OpenSim.Client.Linden | |||
202 | agent.Appearance = new AvatarAppearance(agent.AgentID); | 202 | agent.Appearance = new AvatarAppearance(agent.AgentID); |
203 | } | 203 | } |
204 | 204 | ||
205 | if (m_regionsConnector.RegionLoginsEnabled) | 205 | string reason; |
206 | bool success = m_regionsConnector.NewUserConnection(regionInfo.RegionHandle, agent, out reason); | ||
207 | if (!success) | ||
206 | { | 208 | { |
207 | string reason; | 209 | response.ErrorReason = "key"; |
208 | bool success = m_regionsConnector.NewUserConnection(regionInfo.RegionHandle, agent, out reason); | 210 | response.ErrorMessage = reason; |
209 | if (!success) | ||
210 | { | ||
211 | response.ErrorReason = "key"; | ||
212 | response.ErrorMessage = reason; | ||
213 | } | ||
214 | return success; | ||
215 | // return m_regionsConnector.NewUserConnection(regionInfo.RegionHandle, agent, out reason); | ||
216 | } | 211 | } |
217 | 212 | return success; | |
218 | return false; | 213 | // return m_regionsConnector.NewUserConnection(regionInfo.RegionHandle, agent, out reason); |
219 | } | 214 | } |
220 | 215 | ||
221 | public override void LogOffUser(UserProfileData theUser, string message) | 216 | public override void LogOffUser(UserProfileData theUser, string message) |
diff --git a/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs b/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs index 60f0ba8..a274ae7 100644 --- a/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs +++ b/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs | |||
@@ -388,12 +388,6 @@ namespace OpenSim.Framework.Communications.Tests | |||
388 | } | 388 | } |
389 | } | 389 | } |
390 | 390 | ||
391 | #region ILoginRegionsConnector Members | ||
392 | public bool RegionLoginsEnabled | ||
393 | { | ||
394 | get { return true; } | ||
395 | } | ||
396 | |||
397 | public void LogOffUserFromGrid(ulong regionHandle, OpenMetaverse.UUID AvatarID, OpenMetaverse.UUID RegionSecret, string message) | 391 | public void LogOffUserFromGrid(ulong regionHandle, OpenMetaverse.UUID AvatarID, OpenMetaverse.UUID RegionSecret, string message) |
398 | { | 392 | { |
399 | } | 393 | } |
@@ -454,8 +448,6 @@ namespace OpenSim.Framework.Communications.Tests | |||
454 | 448 | ||
455 | return null; | 449 | return null; |
456 | } | 450 | } |
457 | |||
458 | #endregion | ||
459 | } | 451 | } |
460 | } | 452 | } |
461 | } \ No newline at end of file | 453 | } |
diff --git a/OpenSim/Framework/ILoginServiceToRegionsConnector.cs b/OpenSim/Framework/ILoginServiceToRegionsConnector.cs index 2aee88e..5a155c1 100644 --- a/OpenSim/Framework/ILoginServiceToRegionsConnector.cs +++ b/OpenSim/Framework/ILoginServiceToRegionsConnector.cs | |||
@@ -32,7 +32,6 @@ namespace OpenSim.Framework | |||
32 | { | 32 | { |
33 | public interface ILoginServiceToRegionsConnector | 33 | public interface ILoginServiceToRegionsConnector |
34 | { | 34 | { |
35 | bool RegionLoginsEnabled { get; } | ||
36 | void LogOffUserFromGrid(ulong regionHandle, UUID AvatarID, UUID RegionSecret, string message); | 35 | void LogOffUserFromGrid(ulong regionHandle, UUID AvatarID, UUID RegionSecret, string message); |
37 | bool NewUserConnection(ulong regionHandle, AgentCircuitData agent, out string reason); | 36 | bool NewUserConnection(ulong regionHandle, AgentCircuitData agent, out string reason); |
38 | RegionInfo RequestClosestRegion(string region); | 37 | RegionInfo RequestClosestRegion(string region); |
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 82b2fd4..c9f2cfa 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs | |||
@@ -287,18 +287,6 @@ namespace OpenSim | |||
287 | "create region", | 287 | "create region", |
288 | "Create a new region", HandleCreateRegion); | 288 | "Create a new region", HandleCreateRegion); |
289 | 289 | ||
290 | m_console.Commands.AddCommand("region", false, "login enable", | ||
291 | "login enable", | ||
292 | "Enable logins to the simulator", HandleLoginEnable); | ||
293 | |||
294 | m_console.Commands.AddCommand("region", false, "login disable", | ||
295 | "login disable", | ||
296 | "Disable logins to the simulator", HandleLoginDisable); | ||
297 | |||
298 | m_console.Commands.AddCommand("region", false, "login status", | ||
299 | "login status", | ||
300 | "Display status of logins", HandleLoginStatus); | ||
301 | |||
302 | m_console.Commands.AddCommand("region", false, "restart", | 290 | m_console.Commands.AddCommand("region", false, "restart", |
303 | "restart", | 291 | "restart", |
304 | "Restart all sims in this instance", RunCommand); | 292 | "Restart all sims in this instance", RunCommand); |
@@ -559,42 +547,6 @@ namespace OpenSim | |||
559 | } | 547 | } |
560 | 548 | ||
561 | /// <summary> | 549 | /// <summary> |
562 | /// Enable logins | ||
563 | /// </summary> | ||
564 | /// <param name="module"></param> | ||
565 | /// <param name="cmd"></param> | ||
566 | private void HandleLoginEnable(string module, string[] cmd) | ||
567 | { | ||
568 | ProcessLogin(true); | ||
569 | } | ||
570 | |||
571 | |||
572 | /// <summary> | ||
573 | /// Disable logins | ||
574 | /// </summary> | ||
575 | /// <param name="module"></param> | ||
576 | /// <param name="cmd"></param> | ||
577 | private void HandleLoginDisable(string module, string[] cmd) | ||
578 | { | ||
579 | ProcessLogin(false); | ||
580 | } | ||
581 | |||
582 | /// <summary> | ||
583 | /// Log login status to the console | ||
584 | /// </summary> | ||
585 | /// <param name="module"></param> | ||
586 | /// <param name="cmd"></param> | ||
587 | private void HandleLoginStatus(string module, string[] cmd) | ||
588 | { | ||
589 | if (m_sceneManager.CurrentOrFirstScene.SceneGridService.RegionLoginsEnabled == false) | ||
590 | |||
591 | m_log.Info("[ Login ] Login are disabled "); | ||
592 | else | ||
593 | m_log.Info("[ Login ] Login are enabled"); | ||
594 | } | ||
595 | |||
596 | |||
597 | /// <summary> | ||
598 | /// Change and load configuration file data. | 550 | /// Change and load configuration file data. |
599 | /// </summary> | 551 | /// </summary> |
600 | /// <param name="module"></param> | 552 | /// <param name="module"></param> |
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index 391856b..cf2ab65 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs | |||
@@ -203,12 +203,6 @@ namespace OpenSim | |||
203 | plugin.PostInitialise(); | 203 | plugin.PostInitialise(); |
204 | } | 204 | } |
205 | 205 | ||
206 | // Only enable logins to the regions once we have completely finished starting up (apart from scripts) | ||
207 | if ((SceneManager.CurrentOrFirstScene != null) && (SceneManager.CurrentOrFirstScene.SceneGridService != null)) | ||
208 | { | ||
209 | SceneManager.CurrentOrFirstScene.SceneGridService.RegionLoginsEnabled = true; | ||
210 | } | ||
211 | |||
212 | AddPluginCommands(); | 206 | AddPluginCommands(); |
213 | } | 207 | } |
214 | 208 | ||
@@ -279,31 +273,6 @@ namespace OpenSim | |||
279 | } | 273 | } |
280 | 274 | ||
281 | /// <summary> | 275 | /// <summary> |
282 | /// Initialises the asset cache. This supports legacy configuration values | ||
283 | /// to ensure consistent operation, but values outside of that namespace | ||
284 | /// are handled by the more generic resolution mechanism provided by | ||
285 | /// the ResolveAssetServer virtual method. If extended resolution fails, | ||
286 | /// then the normal default action is taken. | ||
287 | /// Creation of the AssetCache is handled by ResolveAssetCache. This | ||
288 | /// function accepts a reference to the instantiated AssetServer and | ||
289 | /// returns an IAssetCache implementation, if possible. This is a virtual | ||
290 | /// method. | ||
291 | /// </summary> | ||
292 | public void ProcessLogin(bool LoginEnabled) | ||
293 | { | ||
294 | if (LoginEnabled) | ||
295 | { | ||
296 | m_log.Info("[LOGIN]: Login is now enabled."); | ||
297 | SceneManager.CurrentOrFirstScene.SceneGridService.RegionLoginsEnabled = true; | ||
298 | } | ||
299 | else | ||
300 | { | ||
301 | m_log.Info("[LOGIN]: Login is now disabled."); | ||
302 | SceneManager.CurrentOrFirstScene.SceneGridService.RegionLoginsEnabled = false; | ||
303 | } | ||
304 | } | ||
305 | |||
306 | /// <summary> | ||
307 | /// Execute the region creation process. This includes setting up scene infrastructure. | 276 | /// Execute the region creation process. This includes setting up scene infrastructure. |
308 | /// </summary> | 277 | /// </summary> |
309 | /// <param name="regionInfo"></param> | 278 | /// <param name="regionInfo"></param> |
diff --git a/OpenSim/Region/CoreModules/Hypergrid/HGStandaloneLoginModule.cs b/OpenSim/Region/CoreModules/Hypergrid/HGStandaloneLoginModule.cs index 46ee3c0..0b54746 100644 --- a/OpenSim/Region/CoreModules/Hypergrid/HGStandaloneLoginModule.cs +++ b/OpenSim/Region/CoreModules/Hypergrid/HGStandaloneLoginModule.cs | |||
@@ -55,21 +55,6 @@ namespace OpenSim.Region.CoreModules.Hypergrid | |||
55 | 55 | ||
56 | protected bool m_enabled = false; // Module is only enabled if running in standalone mode | 56 | protected bool m_enabled = false; // Module is only enabled if running in standalone mode |
57 | 57 | ||
58 | public bool RegionLoginsEnabled | ||
59 | { | ||
60 | get | ||
61 | { | ||
62 | if (m_firstScene != null) | ||
63 | { | ||
64 | return m_firstScene.SceneGridService.RegionLoginsEnabled; | ||
65 | } | ||
66 | else | ||
67 | { | ||
68 | return false; | ||
69 | } | ||
70 | } | ||
71 | } | ||
72 | |||
73 | protected HGLoginAuthService m_loginService; | 58 | protected HGLoginAuthService m_loginService; |
74 | 59 | ||
75 | #region IRegionModule Members | 60 | #region IRegionModule Members |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/HGGridConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/HGGridConnector.cs index 93cb60c..f9cd90f 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/HGGridConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/HGGridConnector.cs | |||
@@ -696,8 +696,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
696 | public bool CheckUserAtEntry(UUID userID, UUID sessionID, out bool comingHome) | 696 | public bool CheckUserAtEntry(UUID userID, UUID sessionID, out bool comingHome) |
697 | { | 697 | { |
698 | comingHome = false; | 698 | comingHome = false; |
699 | if (!m_aScene.SceneGridService.RegionLoginsEnabled) | ||
700 | return false; | ||
701 | 699 | ||
702 | CachedUserInfo uinfo = m_aScene.CommsManager.UserProfileCacheService.GetUserDetails(userID); | 700 | CachedUserInfo uinfo = m_aScene.CommsManager.UserProfileCacheService.GetUserDetails(userID); |
703 | if (uinfo != null) | 701 | if (uinfo != null) |
diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs index f49d072..6164368 100644 --- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs | |||
@@ -65,13 +65,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
65 | 65 | ||
66 | protected List<UUID> m_agentsInTransit; | 66 | protected List<UUID> m_agentsInTransit; |
67 | 67 | ||
68 | public bool RegionLoginsEnabled | ||
69 | { | ||
70 | get { return m_regionLoginsEnabled; } | ||
71 | set { m_regionLoginsEnabled = value; } | ||
72 | } | ||
73 | private bool m_regionLoginsEnabled = false; | ||
74 | |||
75 | /// <summary> | 68 | /// <summary> |
76 | /// An agent is crossing into this region | 69 | /// An agent is crossing into this region |
77 | /// </summary> | 70 | /// </summary> |