Guard against unauthorized agent deletes.

This commit is contained in:
Diva Canto
2013-07-13 21:28:46 -07:00
parent 931eb892d9
commit b4f1b9acf6
9 changed files with 57 additions and 32 deletions

View File

@@ -286,7 +286,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
return false;
}
public bool CloseAgent(GridRegion destination, UUID id)
public bool CloseAgent(GridRegion destination, UUID id, string auth_token)
{
if (destination == null)
return false;
@@ -297,7 +297,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
// "[LOCAL SIMULATION CONNECTOR]: Found region {0} {1} to send AgentUpdate",
// s.RegionInfo.RegionName, destination.RegionHandle);
m_scenes[destination.RegionID].IncomingCloseAgent(id, false);
m_scenes[destination.RegionID].IncomingCloseAgent(id, false, auth_token);
return true;
}

View File

@@ -245,18 +245,18 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
}
public bool CloseAgent(GridRegion destination, UUID id)
public bool CloseAgent(GridRegion destination, UUID id, string auth_token)
{
if (destination == null)
return false;
// Try local first
if (m_localBackend.CloseAgent(destination, id))
if (m_localBackend.CloseAgent(destination, id, auth_token))
return true;
// else do the remote thing
if (!m_localBackend.IsLocalRegion(destination.RegionID))
return m_remoteConnector.CloseAgent(destination, id);
return m_remoteConnector.CloseAgent(destination, id, auth_token);
return false;
}