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.cs12
1 files changed, 11 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index 340dd39..3431309 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -544,11 +544,21 @@ namespace OpenSim.Region.ScriptEngine.XEngine
544 Evidence baseEvidence = AppDomain.CurrentDomain.Evidence; 544 Evidence baseEvidence = AppDomain.CurrentDomain.Evidence;
545 Evidence evidence = new Evidence(baseEvidence); 545 Evidence evidence = new Evidence(baseEvidence);
546 546
547 m_AppDomains[appDomain] = 547 AppDomain sandbox =
548 AppDomain.CreateDomain( 548 AppDomain.CreateDomain(
549 m_Scene.RegionInfo.RegionID.ToString(), 549 m_Scene.RegionInfo.RegionID.ToString(),
550 evidence, appSetup); 550 evidence, appSetup);
551 551
552 PolicyLevel sandboxPolicy = PolicyLevel.CreateAppDomainLevel();
553 AllMembershipCondition sandboxMembershipCondition = new AllMembershipCondition();
554 PermissionSet sandboxPermissionSet = sandboxPolicy.GetNamedPermissionSet("Internet");
555 PolicyStatement sandboxPolicyStatement = new PolicyStatement(sandboxPermissionSet);
556 CodeGroup sandboxCodeGroup = new UnionCodeGroup(sandboxMembershipCondition, sandboxPolicyStatement);
557 sandboxPolicy.RootCodeGroup = sandboxCodeGroup;
558 sandbox.SetAppDomainPolicy(sandboxPolicy);
559
560 m_AppDomains[appDomain] = sandbox;
561
552 m_AppDomains[appDomain].AssemblyResolve += 562 m_AppDomains[appDomain].AssemblyResolve +=
553 new ResolveEventHandler( 563 new ResolveEventHandler(
554 AssemblyResolver.OnAssemblyResolve); 564 AssemblyResolver.OnAssemblyResolve);