diff options
author | Melanie | 2012-10-14 17:32:46 +0200 |
---|---|---|
committer | Melanie | 2012-10-14 17:32:46 +0200 |
commit | aba078c93f4966cf6be10fc02228323843b9249e (patch) | |
tree | ab08d081aa69b16757dbd5c67f487527558d12fe | |
parent | Allow bypassing perms dialog (console only) (diff) | |
download | opensim-SC-aba078c93f4966cf6be10fc02228323843b9249e.zip opensim-SC-aba078c93f4966cf6be10fc02228323843b9249e.tar.gz opensim-SC-aba078c93f4966cf6be10fc02228323843b9249e.tar.bz2 opensim-SC-aba078c93f4966cf6be10fc02228323843b9249e.tar.xz |
Fix perms when linking an object. Set root part perms to the perms
of the link set to make the build floater behave consistently.
Fixes permissions exploit introduced on 23 August.
Diffstat (limited to '')
5 files changed, 30 insertions, 15 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs index e962624..edd9707 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs | |||
@@ -181,7 +181,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
181 | } | 181 | } |
182 | } | 182 | } |
183 | 183 | ||
184 | //m_log.DebugFormat("[INSTANT MESSAGE]: Delivering IM to {0} via XMLRPC", im.toAgentID); | 184 | m_log.DebugFormat("[INSTANT MESSAGE]: Delivering IM to {0} via XMLRPC", im.toAgentID); |
185 | 185 | ||
186 | SendGridInstantMessageViaXMLRPC(im, result); | 186 | SendGridInstantMessageViaXMLRPC(im, result); |
187 | } | 187 | } |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index dd9210f..ff8589a 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -2503,6 +2503,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
2503 | } | 2503 | } |
2504 | 2504 | ||
2505 | m_sceneGraph.LinkObjects(root, children); | 2505 | m_sceneGraph.LinkObjects(root, children); |
2506 | |||
2507 | ScenePresence sp; | ||
2508 | if (TryGetScenePresence(agentId, out sp)) | ||
2509 | { | ||
2510 | root.SendPropertiesToClient(sp.ControllingClient); | ||
2511 | } | ||
2506 | } | 2512 | } |
2507 | 2513 | ||
2508 | private string PermissionString(uint permissions) | 2514 | private string PermissionString(uint permissions) |
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index e29b2c1..af13b46 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -1849,6 +1849,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1849 | SceneObjectGroupsByLocalPartID[part.LocalId] = parentGroup; | 1849 | SceneObjectGroupsByLocalPartID[part.LocalId] = parentGroup; |
1850 | } | 1850 | } |
1851 | 1851 | ||
1852 | parentGroup.AdjustChildPrimPermissions(); | ||
1852 | parentGroup.HasGroupChanged = true; | 1853 | parentGroup.HasGroupChanged = true; |
1853 | parentGroup.ProcessBackup(m_parentScene.SimulationDataService, true); | 1854 | parentGroup.ProcessBackup(m_parentScene.SimulationDataService, true); |
1854 | parentGroup.ScheduleGroupForFullUpdate(); | 1855 | parentGroup.ScheduleGroupForFullUpdate(); |
@@ -1989,6 +1990,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1989 | // return unless the root is deleted. This will remove them | 1990 | // return unless the root is deleted. This will remove them |
1990 | // from the database. They will be rewritten immediately, | 1991 | // from the database. They will be rewritten immediately, |
1991 | // minus the rows for the unlinked child prims. | 1992 | // minus the rows for the unlinked child prims. |
1993 | g.AdjustChildPrimPermissions(); | ||
1992 | m_parentScene.SimulationDataService.RemoveObject(g.UUID, m_parentScene.RegionInfo.RegionID); | 1994 | m_parentScene.SimulationDataService.RemoveObject(g.UUID, m_parentScene.RegionInfo.RegionID); |
1993 | g.TriggerScriptChangedEvent(Changed.LINK); | 1995 | g.TriggerScriptChangedEvent(Changed.LINK); |
1994 | g.HasGroupChanged = true; // Persist | 1996 | g.HasGroupChanged = true; // Persist |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 9dd6639..053bfb4 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -3410,11 +3410,18 @@ namespace OpenSim.Region.Framework.Scenes | |||
3410 | 3410 | ||
3411 | public void AdjustChildPrimPermissions() | 3411 | public void AdjustChildPrimPermissions() |
3412 | { | 3412 | { |
3413 | uint newOwnerMask = (uint)PermissionMask.All & 0xfffffff8; // Mask folded bits | ||
3414 | uint foldedPerms = RootPart.OwnerMask & 3; | ||
3415 | |||
3413 | ForEachPart(part => | 3416 | ForEachPart(part => |
3414 | { | 3417 | { |
3418 | newOwnerMask &= part.BaseMask; | ||
3415 | if (part != RootPart) | 3419 | if (part != RootPart) |
3416 | part.ClonePermissions(RootPart); | 3420 | part.ClonePermissions(RootPart); |
3417 | }); | 3421 | }); |
3422 | |||
3423 | RootPart.OwnerMask = newOwnerMask | foldedPerms; | ||
3424 | RootPart.ScheduleFullUpdate(); | ||
3418 | } | 3425 | } |
3419 | 3426 | ||
3420 | public void UpdatePermissions(UUID AgentID, byte field, uint localID, | 3427 | public void UpdatePermissions(UUID AgentID, byte field, uint localID, |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index c2d4764..3274cbd 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -4497,20 +4497,20 @@ namespace OpenSim.Region.Framework.Scenes | |||
4497 | { | 4497 | { |
4498 | bool update = false; | 4498 | bool update = false; |
4499 | 4499 | ||
4500 | if (BaseMask != source.BaseMask || | 4500 | uint prevOwnerMask = OwnerMask; |
4501 | OwnerMask != source.OwnerMask || | 4501 | uint prevGroupMask = GroupMask; |
4502 | GroupMask != source.GroupMask || | 4502 | uint prevEveryoneMask = EveryoneMask; |
4503 | EveryoneMask != source.EveryoneMask || | 4503 | uint prevNextOwnerMask = NextOwnerMask; |
4504 | NextOwnerMask != source.NextOwnerMask) | 4504 | |
4505 | update = true; | 4505 | OwnerMask = source.OwnerMask & BaseMask; |
4506 | 4506 | GroupMask = source.GroupMask & BaseMask; | |
4507 | BaseMask = source.BaseMask; | 4507 | EveryoneMask = source.EveryoneMask & BaseMask; |
4508 | OwnerMask = source.OwnerMask; | 4508 | NextOwnerMask = source.NextOwnerMask & BaseMask; |
4509 | GroupMask = source.GroupMask; | 4509 | |
4510 | EveryoneMask = source.EveryoneMask; | 4510 | if (OwnerMask != prevOwnerMask || |
4511 | NextOwnerMask = source.NextOwnerMask; | 4511 | GroupMask != prevGroupMask || |
4512 | 4512 | EveryoneMask != prevEveryoneMask || | |
4513 | if (update) | 4513 | NextOwnerMask != prevNextOwnerMask) |
4514 | SendFullUpdateToAllClients(); | 4514 | SendFullUpdateToAllClients(); |
4515 | } | 4515 | } |
4516 | 4516 | ||