aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/DotNetEngine
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/DotNetEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/AppDomainManager.cs13
1 files changed, 12 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/AppDomainManager.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/AppDomainManager.cs
index 9cdd006..7931cb2 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/AppDomainManager.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/AppDomainManager.cs
@@ -29,6 +29,9 @@ using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.Reflection; 31using System.Reflection;
32using System.Security;
33using System.Security.Policy;
34using System.Security.Permissions;
32using OpenSim.Region.ScriptEngine.Interfaces; 35using OpenSim.Region.ScriptEngine.Interfaces;
33using OpenSim.Region.ScriptEngine.Shared.ScriptBase; 36using OpenSim.Region.ScriptEngine.Shared.ScriptBase;
34 37
@@ -132,9 +135,17 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
132 ads.ConfigurationFile = 135 ads.ConfigurationFile =
133 AppDomain.CurrentDomain.SetupInformation.ConfigurationFile; 136 AppDomain.CurrentDomain.SetupInformation.ConfigurationFile;
134 137
135
136 AppDomain AD = AppDomain.CreateDomain("ScriptAppDomain_" + 138 AppDomain AD = AppDomain.CreateDomain("ScriptAppDomain_" +
137 AppDomainNameCount, null, ads); 139 AppDomainNameCount, null, ads);
140
141 PolicyLevel sandboxPolicy = PolicyLevel.CreateAppDomainLevel();
142 AllMembershipCondition sandboxMembershipCondition = new AllMembershipCondition();
143 PermissionSet sandboxPermissionSet = sandboxPolicy.GetNamedPermissionSet("Internet");
144 PolicyStatement sandboxPolicyStatement = new PolicyStatement(sandboxPermissionSet);
145 CodeGroup sandboxCodeGroup = new UnionCodeGroup(sandboxMembershipCondition, sandboxPolicyStatement);
146 sandboxPolicy.RootCodeGroup = sandboxCodeGroup;
147 AD.SetAppDomainPolicy(sandboxPolicy);
148
138 m_scriptEngine.Log.Info("[" + m_scriptEngine.ScriptEngineName + 149 m_scriptEngine.Log.Info("[" + m_scriptEngine.ScriptEngineName +
139 "]: AppDomain Loading: " + 150 "]: AppDomain Loading: " +
140 AssemblyName.GetAssemblyName( 151 AssemblyName.GetAssemblyName(