Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/01/11 17:48:53 (13 years ago)
Author:
mkommend
Message:

#1479: Integrated trunk changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/GP.Grammar.Editor/HeuristicLab.PluginInfrastructure/3.3/Sandboxing/SandboxManager.cs

    r6174 r6618  
    2525using System.Security.Permissions;
    2626using HeuristicLab.PluginInfrastructure.Manager;
     27using System.IO;
    2728
    2829namespace HeuristicLab.PluginInfrastructure.Sandboxing {
     
    6768      pSet.AddPermission(new SecurityPermission(SecurityPermissionFlag.UnmanagedCode));
    6869      pSet.AddPermission(new SecurityPermission(SecurityPermissionFlag.SerializationFormatter));
    69       pSet.AddPermission(new SecurityPermission(SecurityPermissionFlag.ControlAppDomain));
    7070      //needed for HeuristicLab.Persistence, see DynamicMethod Constructor (String, Type, array<Type []()>[], Type, Boolean)
    7171      pSet.AddPermission(new SecurityPermission(SecurityPermissionFlag.ControlEvidence));
    72 
    73       ReflectionPermission refPerm = new ReflectionPermission(PermissionState.Unrestricted);
    74       pSet.AddPermission(refPerm);
     72      pSet.AddPermission(new ReflectionPermission(PermissionState.Unrestricted));
    7573
    7674      FileIOPermission ioPerm = new FileIOPermission(PermissionState.None);
    7775      //allow path discovery for system drive, needed by HeuristicLab.Persistence: Serializer.BuildTypeCache() -> Assembly.CodeBase
    78       ioPerm.AddPathList(FileIOPermissionAccess.PathDiscovery, Environment.SystemDirectory.Substring(0, 3));
     76      ioPerm.AddPathList(FileIOPermissionAccess.PathDiscovery, Path.GetPathRoot(Path.GetFullPath(Environment.SystemDirectory)));
    7977      //allow full access to the appdomain's base directory
    8078      ioPerm.AddPathList(FileIOPermissionAccess.AllAccess, applicationBase);
Note: See TracChangeset for help on using the changeset viewer.