diff options
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index ba08aab..fcfa448 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -4351,6 +4351,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4351 | protected virtual bool AuthorizeUser(AgentCircuitData agent, bool bypassAccessControl, out string reason) | 4351 | protected virtual bool AuthorizeUser(AgentCircuitData agent, bool bypassAccessControl, out string reason) |
4352 | { | 4352 | { |
4353 | reason = String.Empty; | 4353 | reason = String.Empty; |
4354 | bool isLocal = false; | ||
4354 | 4355 | ||
4355 | if (!m_strictAccessControl) | 4356 | if (!m_strictAccessControl) |
4356 | return true; | 4357 | return true; |
@@ -4360,7 +4361,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4360 | if (AuthorizationService != null) | 4361 | if (AuthorizationService != null) |
4361 | { | 4362 | { |
4362 | if (!AuthorizationService.IsAuthorizedForRegion( | 4363 | if (!AuthorizationService.IsAuthorizedForRegion( |
4363 | agent.AgentID.ToString(), agent.firstname, agent.lastname, RegionInfo.RegionID.ToString(), out reason)) | 4364 | agent.AgentID.ToString(), agent.firstname, agent.lastname, RegionInfo.RegionID.ToString(), out reason, out isLocal)) |
4364 | { | 4365 | { |
4365 | m_log.WarnFormat("[CONNECTION BEGIN]: Denied access to: {0} ({1} {2}) at {3} because: {4}", | 4366 | m_log.WarnFormat("[CONNECTION BEGIN]: Denied access to: {0} ({1} {2}) at {3} because: {4}", |
4366 | agent.AgentID, agent.firstname, agent.lastname, RegionInfo.RegionName, reason); | 4367 | agent.AgentID, agent.firstname, agent.lastname, RegionInfo.RegionName, reason); |
@@ -4403,15 +4404,24 @@ namespace OpenSim.Region.Framework.Scenes | |||
4403 | for(int i = 0;i < GroupMembership.Length;i++) | 4404 | for(int i = 0;i < GroupMembership.Length;i++) |
4404 | agentGroups.Add(GroupMembership[i].GroupID); | 4405 | agentGroups.Add(GroupMembership[i].GroupID); |
4405 | // We get called twice, the first time the name is set to a single space. | 4406 | // We get called twice, the first time the name is set to a single space. |
4407 | // The first time is from QueryAccess(), the second from NewUserConnection() | ||
4406 | // if (" " != agent.Name) | 4408 | // if (" " != agent.Name) |
4407 | { | 4409 | { |
4408 | string grid = "local"; | 4410 | string grid = ""; |
4409 | // agent.AgentID could look like this - @grid.com:8002 01234567-89ab-cdef-0123-456789abcdef | 4411 | if (isLocal) |
4410 | string a = agent.AgentID.ToString(); | ||
4411 | if ("@" == a.Substring(0, 1)) | ||
4412 | { | 4412 | { |
4413 | grid = a.Split(':')[0].Substring(1); | 4413 | grid = "local"; |
4414 | m_log.InfoFormat("[CONNECTION BEGIN]: HYPERGRID agent {0} from grid {1}, checking auto groups.", agent.AgentID, grid); | 4414 | m_log.InfoFormat("[CONNECTION BEGIN]: LOCAL agent {0}, checking auto groups.", agent.AgentID); |
4415 | } | ||
4416 | else | ||
4417 | { | ||
4418 | // agent.AgentID could look like this - @grid.com:8002 01234567-89ab-cdef-0123-456789abcdef | ||
4419 | string a = agent.AgentID.ToString(); | ||
4420 | if ("@" == a.Substring(0, 1)) | ||
4421 | { | ||
4422 | grid = a.Split(':')[0].Substring(1); | ||
4423 | m_log.InfoFormat("[CONNECTION BEGIN]: HYPERGRID agent {0} from grid {1}, checking auto groups.", agent.AgentID, grid); | ||
4424 | } | ||
4415 | } | 4425 | } |
4416 | string[] groupIDs = null; | 4426 | string[] groupIDs = null; |
4417 | try | 4427 | try |