aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2014-07-21 23:53:33 +0100
committerJustin Clark-Casey (justincc)2014-07-21 23:53:33 +0100
commit3c6becd52495360b24b3760a30fb0e007f5a16a3 (patch)
tree51362e21c3ea699e948e19ee3ce4a37058d1c337 /OpenSim/Services
parentminor: Limit processor related stats to 3 decimal places instead of all the p... (diff)
downloadopensim-SC_OLD-3c6becd52495360b24b3760a30fb0e007f5a16a3.zip
opensim-SC_OLD-3c6becd52495360b24b3760a30fb0e007f5a16a3.tar.gz
opensim-SC_OLD-3c6becd52495360b24b3760a30fb0e007f5a16a3.tar.bz2
opensim-SC_OLD-3c6becd52495360b24b3760a30fb0e007f5a16a3.tar.xz
On login and first HG entrance to a foreign grid, perform query access checks before proceeding.
Diffstat (limited to 'OpenSim/Services')
-rw-r--r--OpenSim/Services/HypergridService/GatekeeperService.cs7
-rw-r--r--OpenSim/Services/Interfaces/ISimulationService.cs6
-rw-r--r--OpenSim/Services/LLLoginService/LLLoginService.cs9
3 files changed, 19 insertions, 3 deletions
diff --git a/OpenSim/Services/HypergridService/GatekeeperService.cs b/OpenSim/Services/HypergridService/GatekeeperService.cs
index 69a593b..771114e 100644
--- a/OpenSim/Services/HypergridService/GatekeeperService.cs
+++ b/OpenSim/Services/HypergridService/GatekeeperService.cs
@@ -432,6 +432,13 @@ namespace OpenSim.Services.HypergridService
432 432
433 m_log.DebugFormat("[GATEKEEPER SERVICE]: Launching {0}, Teleport Flags: {1}", aCircuit.Name, loginFlag); 433 m_log.DebugFormat("[GATEKEEPER SERVICE]: Launching {0}, Teleport Flags: {1}", aCircuit.Name, loginFlag);
434 434
435 string version;
436
437 if (!m_SimulationService.QueryAccess(
438 destination, aCircuit.AgentID, aCircuit.ServiceURLs["HomeURI"].ToString(),
439 true, aCircuit.startpos, null, out version, out reason))
440 return false;
441
435 return m_SimulationService.CreateAgent(source, destination, aCircuit, (uint)loginFlag, out reason); 442 return m_SimulationService.CreateAgent(source, destination, aCircuit, (uint)loginFlag, out reason);
436 } 443 }
437 444
diff --git a/OpenSim/Services/Interfaces/ISimulationService.cs b/OpenSim/Services/Interfaces/ISimulationService.cs
index 12ab478..ef014f9 100644
--- a/OpenSim/Services/Interfaces/ISimulationService.cs
+++ b/OpenSim/Services/Interfaces/ISimulationService.cs
@@ -85,8 +85,10 @@ namespace OpenSim.Services.Interfaces
85 /// <param name="agentHomeURI">The visitor's Home URI. Will be missing (null) in older OpenSims.</param> 85 /// <param name="agentHomeURI">The visitor's Home URI. Will be missing (null) in older OpenSims.</param>
86 /// <param name="viaTeleport">True: via teleport; False: via cross (walking)</param> 86 /// <param name="viaTeleport">True: via teleport; False: via cross (walking)</param>
87 /// <param name="position">Position in the region</param> 87 /// <param name="position">Position in the region</param>
88 /// <param name="sversion">version that the requesting simulator is runing</param> 88 /// <param name="sversion">
89 /// <param name="version">version that the target simulator is running</param> 89 /// Version that the requesting simulator is runing. If null then no version check is carried out.
90 /// </param>
91 /// <param name="version">Version that the target simulator is running</param>
90 /// <param name="reason">[out] Optional error message</param> 92 /// <param name="reason">[out] Optional error message</param>
91 /// <returns>True: ok; False: not allowed</returns> 93 /// <returns>True: ok; False: not allowed</returns>
92 bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, string sversion, out string version, out string reason); 94 bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, string sversion, out string version, out string reason);
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs
index 5888cce..264a630 100644
--- a/OpenSim/Services/LLLoginService/LLLoginService.cs
+++ b/OpenSim/Services/LLLoginService/LLLoginService.cs
@@ -959,12 +959,19 @@ namespace OpenSim.Services.LLLoginService
959 959
960 private bool LaunchAgentDirectly(ISimulationService simConnector, GridRegion region, AgentCircuitData aCircuit, TeleportFlags flags, out string reason) 960 private bool LaunchAgentDirectly(ISimulationService simConnector, GridRegion region, AgentCircuitData aCircuit, TeleportFlags flags, out string reason)
961 { 961 {
962 string version;
963
964 if (!simConnector.QueryAccess(region, aCircuit.AgentID, null, true, aCircuit.startpos, null, out version, out reason))
965 return false;
966
962 return simConnector.CreateAgent(null, region, aCircuit, (uint)flags, out reason); 967 return simConnector.CreateAgent(null, region, aCircuit, (uint)flags, out reason);
963 } 968 }
964 969
965 private bool LaunchAgentIndirectly(GridRegion gatekeeper, GridRegion destination, AgentCircuitData aCircuit, IPEndPoint clientIP, out string reason) 970 private bool LaunchAgentIndirectly(GridRegion gatekeeper, GridRegion destination, AgentCircuitData aCircuit, IPEndPoint clientIP, out string reason)
966 { 971 {
967 m_log.Debug("[LLOGIN SERVICE] Launching agent at " + destination.RegionName); 972 string version;
973
974 m_log.Debug("[LLOGIN SERVICE]: Launching agent at " + destination.RegionName);
968 if (m_UserAgentService.LoginAgentToGrid(null, aCircuit, gatekeeper, destination, true, out reason)) 975 if (m_UserAgentService.LoginAgentToGrid(null, aCircuit, gatekeeper, destination, true, out reason))
969 return true; 976 return true;
970 return false; 977 return false;