fix incoerent definition of Slam bit (bits 3 and 4 used in diferent

places.) this may still be wrong on other places; Do not loose folded
permitions,  WARNING MASTER IS NOW UNSTABLE. permissions are still broken"
melanie
UbitUmarov 2017-01-14 14:19:58 +00:00
parent e263730ada
commit fb86e41561
4 changed files with 11 additions and 10 deletions

View File

@ -66,9 +66,10 @@ namespace OpenSim.Framework
FoldedTransfer = 1, FoldedTransfer = 1,
FoldedModify = 1 << 1, FoldedModify = 1 << 1,
FoldedCopy = 1 << 2, FoldedCopy = 1 << 2,
FoldedExport = 1 << 4, FoldedExport = 1 << 3,
Slam = 1 << 4,
FoldedMask = 0x17, FoldedMask = 0x0f,
// //
Transfer = 1 << 13, Transfer = 1 << 13,

View File

@ -605,15 +605,18 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
perms &= ~(uint)PermissionMask.Transfer; perms &= ~(uint)PermissionMask.Transfer;
if ((nextPerms & (uint)PermissionMask.Modify) == 0) if ((nextPerms & (uint)PermissionMask.Modify) == 0)
perms &= ~(uint)PermissionMask.Modify; perms &= ~(uint)PermissionMask.Modify;
item.BasePermissions = perms & so.RootPart.NextOwnerMask; // item.BasePermissions = perms & so.RootPart.NextOwnerMask;
uint nextp = so.RootPart.NextOwnerMask | 0x0f;
item.BasePermissions = perms & nextp;
item.CurrentPermissions = item.BasePermissions; item.CurrentPermissions = item.BasePermissions;
item.NextPermissions = perms & so.RootPart.NextOwnerMask; item.NextPermissions = perms & so.RootPart.NextOwnerMask;
item.EveryOnePermissions = so.RootPart.EveryoneMask & so.RootPart.NextOwnerMask; item.EveryOnePermissions = so.RootPart.EveryoneMask & so.RootPart.NextOwnerMask;
item.GroupPermissions = so.RootPart.GroupMask & so.RootPart.NextOwnerMask; item.GroupPermissions = so.RootPart.GroupMask & so.RootPart.NextOwnerMask;
// apply next owner perms on rez // apply next owner perms on rez
item.CurrentPermissions |= SceneObjectGroup.SLAM; item.CurrentPermissions |= (uint)PermissionMask.Slam;
} }
else else
{ {
@ -1124,7 +1127,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
// rootPart.OwnerID, item.Owner, item.CurrentPermissions); // rootPart.OwnerID, item.Owner, item.CurrentPermissions);
if ((rootPart.OwnerID != item.Owner) || if ((rootPart.OwnerID != item.Owner) ||
(item.CurrentPermissions & 8) != 0 || (item.CurrentPermissions & (uint)PermissionMask.Slam) != 0 ||
(item.Flags & (uint)InventoryItemFlags.ObjectSlamPerm) != 0) (item.Flags & (uint)InventoryItemFlags.ObjectSlamPerm) != 0)
{ {
//Need to kill the for sale here //Need to kill the for sale here

View File

@ -117,9 +117,6 @@ namespace OpenSim.Region.Framework.Scenes
NOT_STATUS_ROTATE_Z = 0xF7 NOT_STATUS_ROTATE_Z = 0xF7
} }
// This flag has the same purpose as InventoryItemFlags.ObjectSlamPerm
public static readonly uint SLAM = 16;
// private PrimCountTaintedDelegate handlerPrimCountTainted = null; // private PrimCountTaintedDelegate handlerPrimCountTainted = null;
/// <summary> /// <summary>

View File

@ -5181,7 +5181,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
/// <param name="scene">The scene the prim is being rezzed into</param> /// <param name="scene">The scene the prim is being rezzed into</param>
public void ApplyPermissionsOnRez(InventoryItemBase item, bool userInventory, Scene scene) public void ApplyPermissionsOnRez(InventoryItemBase item, bool userInventory, Scene scene)
{ {
if ((OwnerID != item.Owner) || ((item.CurrentPermissions & SceneObjectGroup.SLAM) != 0) || ((item.Flags & (uint)InventoryItemFlags.ObjectSlamPerm) != 0)) if ((OwnerID != item.Owner) || ((item.CurrentPermissions & (uint)PermissionMask.Slam) != 0) || ((item.Flags & (uint)InventoryItemFlags.ObjectSlamPerm) != 0))
{ {
if (scene.Permissions.PropagatePermissions()) if (scene.Permissions.PropagatePermissions())
{ {