aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs
diff options
context:
space:
mode:
authorMelanie Thielker2008-10-06 03:23:55 +0000
committerMelanie Thielker2008-10-06 03:23:55 +0000
commitc4ab9482b5304b3cc25d8f05cf0f3c4d6ecab5b0 (patch)
tree6c519001e33d48d846c227bb928e1b6c1f4fdb3b /OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs
parentFix a privilege escalation with linked sets (diff)
downloadopensim-SC-c4ab9482b5304b3cc25d8f05cf0f3c4d6ecab5b0.zip
opensim-SC-c4ab9482b5304b3cc25d8f05cf0f3c4d6ecab5b0.tar.gz
opensim-SC-c4ab9482b5304b3cc25d8f05cf0f3c4d6ecab5b0.tar.bz2
opensim-SC-c4ab9482b5304b3cc25d8f05cf0f3c4d6ecab5b0.tar.xz
More perms fixes. Reinstate the move flag
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs16
1 files changed, 10 insertions, 6 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs
index 5ce8985..1b2ee7d 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs
@@ -248,21 +248,25 @@ namespace OpenSim.Region.Environment.Scenes
248 PermissionMask.Move | 248 PermissionMask.Move |
249 PermissionMask.Transfer) | 7; 249 PermissionMask.Transfer) | 7;
250 250
251 uint ownerMask = 0x7ffffff;
251 foreach (SceneObjectPart part in m_parts.Values) 252 foreach (SceneObjectPart part in m_parts.Values)
253 {
254 ownerMask &= part.OwnerMask;
252 perms &= part.MaskEffectivePermissions(); 255 perms &= part.MaskEffectivePermissions();
256 }
253 257
254 if ((RootPart.OwnerMask & (uint)PermissionMask.Modify) == 0) 258 if (ownerMask & (uint)PermissionMask.Modify) == 0)
255 perms &= ~(uint)PermissionMask.Modify; 259 perms &= ~(uint)PermissionMask.Modify;
256 if ((RootPart.OwnerMask & (uint)PermissionMask.Copy) == 0) 260 if (ownerMask & (uint)PermissionMask.Copy) == 0)
257 perms &= ~(uint)PermissionMask.Copy; 261 perms &= ~(uint)PermissionMask.Copy;
258 if ((RootPart.OwnerMask & (uint)PermissionMask.Transfer) == 0) 262 if (ownerMask & (uint)PermissionMask.Transfer) == 0)
259 perms &= ~(uint)PermissionMask.Transfer; 263 perms &= ~(uint)PermissionMask.Transfer;
260 264
261 if ((RootPart.OwnerMask & RootPart.NextOwnerMask & (uint)PermissionMask.Modify) == 0) 265 if (ownerMask & RootPart.NextOwnerMask & (uint)PermissionMask.Modify) == 0)
262 perms &= ~((uint)PermissionMask.Modify >> 13); 266 perms &= ~((uint)PermissionMask.Modify >> 13);
263 if ((RootPart.OwnerMask & RootPart.NextOwnerMask & (uint)PermissionMask.Copy) == 0) 267 if (ownerMask & RootPart.NextOwnerMask & (uint)PermissionMask.Copy) == 0)
264 perms &= ~((uint)PermissionMask.Copy >> 13); 268 perms &= ~((uint)PermissionMask.Copy >> 13);
265 if ((RootPart.OwnerMask & RootPart.NextOwnerMask & (uint)PermissionMask.Transfer) == 0) 269 if (ownerMask & RootPart.NextOwnerMask & (uint)PermissionMask.Transfer) == 0)
266 perms &= ~((uint)PermissionMask.Transfer >> 13); 270 perms &= ~((uint)PermissionMask.Transfer >> 13);
267 271
268 return perms; 272 return perms;