aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs29
1 files changed, 22 insertions, 7 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 847df03..ec9e87e 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -424,8 +424,8 @@ namespace OpenSim.Region.Framework.Scenes
424 private uint _category; 424 private uint _category;
425 private Int32 _creationDate; 425 private Int32 _creationDate;
426 private uint _parentID = 0; 426 private uint _parentID = 0;
427 private uint _baseMask = (uint)PermissionMask.All; 427 private uint _baseMask = (uint)(PermissionMask.All | PermissionMask.Export);
428 private uint _ownerMask = (uint)PermissionMask.All; 428 private uint _ownerMask = (uint)(PermissionMask.All | PermissionMask.Export);
429 private uint _groupMask = (uint)PermissionMask.None; 429 private uint _groupMask = (uint)PermissionMask.None;
430 private uint _everyoneMask = (uint)PermissionMask.None; 430 private uint _everyoneMask = (uint)PermissionMask.None;
431 private uint _nextOwnerMask = (uint)PermissionMask.All; 431 private uint _nextOwnerMask = (uint)PermissionMask.All;
@@ -3876,10 +3876,10 @@ namespace OpenSim.Region.Framework.Scenes
3876 3876
3877 public void TrimPermissions() 3877 public void TrimPermissions()
3878 { 3878 {
3879 BaseMask &= (uint)PermissionMask.All; 3879 BaseMask &= (uint)(PermissionMask.All | PermissionMask.Export);
3880 OwnerMask &= (uint)PermissionMask.All; 3880 OwnerMask &= (uint)(PermissionMask.All | PermissionMask.Export);
3881 GroupMask &= (uint)PermissionMask.All; 3881 GroupMask &= (uint)PermissionMask.All;
3882 EveryoneMask &= (uint)PermissionMask.All; 3882 EveryoneMask &= (uint)(PermissionMask.All | PermissionMask.Export);
3883 NextOwnerMask &= (uint)PermissionMask.All; 3883 NextOwnerMask &= (uint)PermissionMask.All;
3884 } 3884 }
3885 3885
@@ -3982,10 +3982,22 @@ namespace OpenSim.Region.Framework.Scenes
3982 baseMask; 3982 baseMask;
3983 break; 3983 break;
3984 case 8: 3984 case 8:
3985 // Trying to set export permissions - extra checks
3986 if (set && (mask & (uint)PermissionMask.Export) != 0)
3987 {
3988 if ((OwnerMask & (uint)PermissionMask.Export) == 0 || (BaseMask & (uint)PermissionMask.Export) == 0 || (NextOwnerMask & (uint)PermissionMask.All) != (uint)PermissionMask.All)
3989 mask &= ~(uint)PermissionMask.Export;
3990 }
3985 EveryoneMask = ApplyMask(EveryoneMask, set, mask) & 3991 EveryoneMask = ApplyMask(EveryoneMask, set, mask) &
3986 baseMask; 3992 baseMask;
3987 break; 3993 break;
3988 case 16: 3994 case 16:
3995 // Force full perm if export
3996 if ((EveryoneMask & (uint)PermissionMask.Export) != 0)
3997 {
3998 NextOwnerMask = (uint)PermissionMask.All;
3999 break;
4000 }
3989 NextOwnerMask = ApplyMask(NextOwnerMask, set, mask) & 4001 NextOwnerMask = ApplyMask(NextOwnerMask, set, mask) &
3990 baseMask; 4002 baseMask;
3991 // Prevent the client from creating no mod, no copy 4003 // Prevent the client from creating no mod, no copy
@@ -4743,9 +4755,12 @@ namespace OpenSim.Region.Framework.Scenes
4743 4755
4744 public void ApplyNextOwnerPermissions() 4756 public void ApplyNextOwnerPermissions()
4745 { 4757 {
4746 BaseMask &= NextOwnerMask; 4758 // Export needs to be preserved in the base and everyone
4759 // mask, but removed in the owner mask as a next owner
4760 // can never change the export status
4761 BaseMask &= NextOwnerMask | (uint)PermissionMask.Export;
4747 OwnerMask &= NextOwnerMask; 4762 OwnerMask &= NextOwnerMask;
4748 EveryoneMask &= NextOwnerMask; 4763 EveryoneMask &= NextOwnerMask | (uint)PermissionMask.Export;
4749 4764
4750 Inventory.ApplyNextOwnerPermissions(); 4765 Inventory.ApplyNextOwnerPermissions();
4751 } 4766 }