aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/XEngine/XEngine.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/XEngine.cs13
1 files changed, 12 insertions, 1 deletions
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;
30using System.Threading; 30using System.Threading;
31using System.Collections; 31using System.Collections;
32using System.Collections.Generic; 32using System.Collections.Generic;
33using System.Security;
33using System.Security.Policy; 34using System.Security.Policy;
34using System.Reflection; 35using System.Reflection;
35using System.Globalization; 36using System.Globalization;
@@ -536,11 +537,21 @@ namespace OpenSim.Region.ScriptEngine.XEngine
536 Evidence baseEvidence = AppDomain.CurrentDomain.Evidence; 537 Evidence baseEvidence = AppDomain.CurrentDomain.Evidence;
537 Evidence evidence = new Evidence(baseEvidence); 538 Evidence evidence = new Evidence(baseEvidence);
538 539
539 m_AppDomains[appDomain] = 540 AppDomain sandbox =
540 AppDomain.CreateDomain( 541 AppDomain.CreateDomain(
541 m_Scene.RegionInfo.RegionID.ToString(), 542 m_Scene.RegionInfo.RegionID.ToString(),
542 evidence, appSetup); 543 evidence, appSetup);
543 544
545 PolicyLevel sandboxPolicy = PolicyLevel.CreateAppDomainLevel();
546 AllMembershipCondition sandboxMembershipCondition = new AllMembershipCondition();
547 PermissionSet sandboxPermissionSet = sandboxPolicy.GetNamedPermissionSet("Internet");
548 PolicyStatement sandboxPolicyStatement = new PolicyStatement(sandboxPermissionSet);
549 CodeGroup sandboxCodeGroup = new UnionCodeGroup(sandboxMembershipCondition, sandboxPolicyStatement);
550 sandboxPolicy.RootCodeGroup = sandboxCodeGroup;
551 sandbox.SetAppDomainPolicy(sandboxPolicy);
552
553 m_AppDomains[appDomain] = sandbox;
554
544 m_AppDomains[appDomain].AssemblyResolve += 555 m_AppDomains[appDomain].AssemblyResolve +=
545 new ResolveEventHandler( 556 new ResolveEventHandler(
546 AssemblyResolver.OnAssemblyResolve); 557 AssemblyResolver.OnAssemblyResolve);