mirror of
https://github.com/opensim/opensim.git
synced 2026-05-25 03:05:41 +08:00
fix llRemoteLoadScriptPin permissions
This commit is contained in:
@@ -8168,19 +8168,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
Error("llRemoteLoadScriptPin", "Can't find script '" + name + "'");
|
||||
return;
|
||||
}
|
||||
|
||||
SceneObjectPart dest = World.GetSceneObjectPart(destId);
|
||||
if (dest != null)
|
||||
if ((item.BasePermissions & (uint)PermissionMask.Copy) == 0)
|
||||
{
|
||||
if ((item.BasePermissions & (uint)PermissionMask.Transfer) != 0 || dest.ParentGroup.RootPart.OwnerID == m_host.ParentGroup.RootPart.OwnerID)
|
||||
{
|
||||
// the rest of the permission checks are done in RezScript, so check the pin there as well
|
||||
World.RezScriptFromPrim(item.ItemID, m_host, destId, pin, running, start_param);
|
||||
|
||||
if ((item.BasePermissions & (uint)PermissionMask.Copy) == 0)
|
||||
m_host.Inventory.RemoveInventoryItem(item.ItemID);
|
||||
}
|
||||
Error("llRemoteLoadScriptPin", "No copy rights");
|
||||
return;
|
||||
}
|
||||
|
||||
// the rest of the permission checks are done in RezScript, so check the pin there as well
|
||||
World.RezScriptFromPrim(item.ItemID, m_host, destId, pin, running, start_param);
|
||||
|
||||
// this will cause the delay even if the script pin or permissions were wrong - seems ok
|
||||
ScriptSleep(m_sleepMsOnRemoteLoadScriptPin);
|
||||
}
|
||||
|
||||
@@ -316,7 +316,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
|
||||
/// </summary>
|
||||
public class EventParams
|
||||
{
|
||||
public EventParams(string eventName, Object[] eventParams, DetectParams[] detectParams)
|
||||
public EventParams(string eventName, object[] eventParams, DetectParams[] detectParams)
|
||||
{
|
||||
EventName = eventName;
|
||||
Params = eventParams;
|
||||
@@ -324,7 +324,10 @@ namespace OpenSim.Region.ScriptEngine.Shared
|
||||
}
|
||||
|
||||
public string EventName;
|
||||
public Object[] Params;
|
||||
public object[] Params;
|
||||
public DetectParams[] DetectParams;
|
||||
|
||||
public static EventParams StateEntryParams = new EventParams("state_entry", new object[0], new DetectParams[0]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user