aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs7
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs6
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs16
3 files changed, 26 insertions, 3 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
index 8c92588..dc33dbb 100644
--- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
@@ -119,6 +119,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
119 return; 119 return;
120 } 120 }
121 121
122 if (part.OwnerID != remoteClient.AgentId) // Not ours
123 {
124 remoteClient.SendAgentAlertMessage(
125 "You don't have sufficient permissions to attach this object", false);
126 return;
127 }
128
122 // TODO: this short circuits multiple attachments functionality in LL viewer 2.1+ and should 129 // TODO: this short circuits multiple attachments functionality in LL viewer 2.1+ and should
123 // be removed when that functionality is implemented in opensim 130 // be removed when that functionality is implemented in opensim
124 AttachmentPt &= 0x7f; 131 AttachmentPt &= 0x7f;
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 9a93a26..9150257 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -1227,6 +1227,10 @@ namespace OpenSim.Region.Framework.Scenes
1227 if ((part.OwnerID != destPart.OwnerID) && ((srcTaskItem.CurrentPermissions & (uint)PermissionMask.Transfer) == 0)) 1227 if ((part.OwnerID != destPart.OwnerID) && ((srcTaskItem.CurrentPermissions & (uint)PermissionMask.Transfer) == 0))
1228 return; 1228 return;
1229 1229
1230 bool overrideNoMod = false;
1231 if ((part.GetEffectiveObjectFlags() & (uint)PrimFlags.AllowInventoryDrop) != 0)
1232 overrideNoMod = true;
1233
1230 if (part.OwnerID != destPart.OwnerID && (part.GetEffectiveObjectFlags() & (uint)PrimFlags.AllowInventoryDrop) == 0) 1234 if (part.OwnerID != destPart.OwnerID && (part.GetEffectiveObjectFlags() & (uint)PrimFlags.AllowInventoryDrop) == 0)
1231 { 1235 {
1232 // object cannot copy items to an object owned by a different owner 1236 // object cannot copy items to an object owned by a different owner
@@ -1236,7 +1240,7 @@ namespace OpenSim.Region.Framework.Scenes
1236 } 1240 }
1237 1241
1238 // must have both move and modify permission to put an item in an object 1242 // must have both move and modify permission to put an item in an object
1239 if ((part.OwnerMask & ((uint)PermissionMask.Move | (uint)PermissionMask.Modify)) == 0) 1243 if (((part.OwnerMask & (uint)PermissionMask.Modify) == 0) && (!overrideNoMod))
1240 { 1244 {
1241 return; 1245 return;
1242 } 1246 }
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index aa6e505..a62a7b4 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -6867,6 +6867,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6867 } 6867 }
6868 6868
6869 // copy the first script found with this inventory name 6869 // copy the first script found with this inventory name
6870 TaskInventoryItem scriptItem = null;
6870 m_host.TaskInventory.LockItemsForRead(true); 6871 m_host.TaskInventory.LockItemsForRead(true);
6871 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory) 6872 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
6872 { 6873 {
@@ -6877,6 +6878,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6877 { 6878 {
6878 found = true; 6879 found = true;
6879 srcId = inv.Key; 6880 srcId = inv.Key;
6881 scriptItem = inv.Value;
6880 break; 6882 break;
6881 } 6883 }
6882 } 6884 }
@@ -6889,8 +6891,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6889 return; 6891 return;
6890 } 6892 }
6891 6893
6892 // the rest of the permission checks are done in RezScript, so check the pin there as well 6894 SceneObjectPart dest = World.GetSceneObjectPart(destId);
6893 World.RezScript(srcId, m_host, destId, pin, running, start_param); 6895 if (dest != null)
6896 {
6897 if ((scriptItem.BasePermissions & (uint)PermissionMask.Transfer) != 0 || dest.ParentGroup.RootPart.OwnerID == m_host.ParentGroup.RootPart.OwnerID)
6898 {
6899 // the rest of the permission checks are done in RezScript, so check the pin there as well
6900 World.RezScript(srcId, m_host, destId, pin, running, start_param);
6901
6902 if ((scriptItem.BasePermissions & (uint)PermissionMask.Copy) == 0)
6903 m_host.Inventory.RemoveInventoryItem(srcId);
6904 }
6905 }
6894 // this will cause the delay even if the script pin or permissions were wrong - seems ok 6906 // this will cause the delay even if the script pin or permissions were wrong - seems ok
6895 ScriptSleep(3000); 6907 ScriptSleep(3000);
6896 } 6908 }