aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
diff options
context:
space:
mode:
authorMelanie2012-10-14 17:32:46 +0200
committerMelanie2012-10-14 17:32:46 +0200
commitaba078c93f4966cf6be10fc02228323843b9249e (patch)
treeab08d081aa69b16757dbd5c67f487527558d12fe /OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
parentAllow bypassing perms dialog (console only) (diff)
downloadopensim-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 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs7
1 files changed, 7 insertions, 0 deletions
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,