From c25a0ea7923aa390d30b8eebdbca4e599edf9b0d Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Mon, 17 Nov 2008 21:00:34 +0000 Subject: * Update libOMV to r2359. This is necessary for the progressive texture patch * Update libopenjpeg as well for this patch. * Appears to be okay on a very short sniff test * Source code will be placed in opensim-libs shortly --- OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/ScriptEngine/XEngine') diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index e5dfb2b..5d5e975 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs @@ -30,6 +30,7 @@ using System.IO; using System.Threading; using System.Collections; using System.Collections.Generic; +using System.Security; using System.Security.Policy; using System.Reflection; using System.Globalization; @@ -536,11 +537,21 @@ namespace OpenSim.Region.ScriptEngine.XEngine Evidence baseEvidence = AppDomain.CurrentDomain.Evidence; Evidence evidence = new Evidence(baseEvidence); - m_AppDomains[appDomain] = + AppDomain sandbox = AppDomain.CreateDomain( m_Scene.RegionInfo.RegionID.ToString(), evidence, appSetup); + PolicyLevel sandboxPolicy = PolicyLevel.CreateAppDomainLevel(); + AllMembershipCondition sandboxMembershipCondition = new AllMembershipCondition(); + PermissionSet sandboxPermissionSet = sandboxPolicy.GetNamedPermissionSet("Internet"); + PolicyStatement sandboxPolicyStatement = new PolicyStatement(sandboxPermissionSet); + CodeGroup sandboxCodeGroup = new UnionCodeGroup(sandboxMembershipCondition, sandboxPolicyStatement); + sandboxPolicy.RootCodeGroup = sandboxCodeGroup; + sandbox.SetAppDomainPolicy(sandboxPolicy); + + m_AppDomains[appDomain] = sandbox; + m_AppDomains[appDomain].AssemblyResolve += new ResolveEventHandler( AssemblyResolver.OnAssemblyResolve); -- cgit v1.1