diff options
author | Justin Clark-Casey (justincc) | 2014-07-21 23:53:33 +0100 |
---|---|---|
committer | Justin Clark-Casey | 2014-08-02 00:57:43 +0100 |
commit | 92e24780597322e58631abd9b9e3494ee3266996 (patch) | |
tree | 4848c3a974d3eb4ca1c7ad892949c8aa90c07ace /OpenSim/Services | |
parent | minor: Limit processor related stats to 3 decimal places instead of all the p... (diff) | |
download | opensim-SC_OLD-92e24780597322e58631abd9b9e3494ee3266996.zip opensim-SC_OLD-92e24780597322e58631abd9b9e3494ee3266996.tar.gz opensim-SC_OLD-92e24780597322e58631abd9b9e3494ee3266996.tar.bz2 opensim-SC_OLD-92e24780597322e58631abd9b9e3494ee3266996.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.cs | 7 | ||||
-rw-r--r-- | OpenSim/Services/Interfaces/ISimulationService.cs | 6 | ||||
-rw-r--r-- | OpenSim/Services/LLLoginService/LLLoginService.cs | 9 |
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; |