diff options
author | Justin Clarke Casey | 2008-11-17 21:00:34 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-11-17 21:00:34 +0000 |
commit | c25a0ea7923aa390d30b8eebdbca4e599edf9b0d (patch) | |
tree | 775133790681153be9edc6d640162271750a1fd0 /OpenSim/Region/ScriptEngine | |
parent | * minor: add interface version to 'show version' command output (diff) | |
download | opensim-SC-c25a0ea7923aa390d30b8eebdbca4e599edf9b0d.zip opensim-SC-c25a0ea7923aa390d30b8eebdbca4e599edf9b0d.tar.gz opensim-SC-c25a0ea7923aa390d30b8eebdbca4e599edf9b0d.tar.bz2 opensim-SC-c25a0ea7923aa390d30b8eebdbca4e599edf9b0d.tar.xz |
* 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
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r-- | OpenSim/Region/ScriptEngine/DotNetEngine/AppDomainManager.cs | 13 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | 13 |
2 files changed, 24 insertions, 2 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; | |||
29 | using System.Collections; | 29 | using System.Collections; |
30 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
31 | using System.Reflection; | 31 | using System.Reflection; |
32 | using System.Security; | ||
33 | using System.Security.Policy; | ||
34 | using System.Security.Permissions; | ||
32 | using OpenSim.Region.ScriptEngine.Interfaces; | 35 | using OpenSim.Region.ScriptEngine.Interfaces; |
33 | using OpenSim.Region.ScriptEngine.Shared.ScriptBase; | 36 | using 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( |
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; | |||
30 | using System.Threading; | 30 | using System.Threading; |
31 | using System.Collections; | 31 | using System.Collections; |
32 | using System.Collections.Generic; | 32 | using System.Collections.Generic; |
33 | using System.Security; | ||
33 | using System.Security.Policy; | 34 | using System.Security.Policy; |
34 | using System.Reflection; | 35 | using System.Reflection; |
35 | using System.Globalization; | 36 | using 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); |