Weblog
Mono CAS - A more interesting sample
I've been cleaning up the System.Security.Permissions and System.Security.Policy classes for the last two weeks. Many small issues were fixed in the process, which in turns let us runs more useful samples.
Today I got to run the MSDN documentation sample for PermissionSet. This is a nice one because, like the previous sample, it involves only CAS Demand but it also use all set-operations, Intersect, IsSubsetOf and Union, between different permission types: FileDialogPermission and EnvironmentPermission.
Here the results on Linux:
Results on Windows (MS runtime) are 100% compatible but not identical due to the ordering of the permissions and the path separators used.
PermissionSet turned out to be a bit more complex than anticipated as it must deal with permissions that do not implement the IUnrestrictedPermission interface (e.g. all identity permissions) which affects all set operations. Also PermissionSet.Demand must take care about non-CAS permissions, like PrincipalPermission and avoid the stack walk if possible.
Oops I almost forgot that I needed your help! The default policies used by the framework are really simple compared to what the .NET framework is capable of. I'd like to know if you, or your company, use any custom policies (entreprise, machine or user specific) or if you have coded any appdomain specific policies. If possible I'd like the XML policies files (cleaned) and/or details of the appdomain policy to plan for the CAS test suite. Thanks :-).
8/31/2004 19:41:44 | Comments
The views expressed on this website/weblog are mine alone and do not necessarily reflect the views of my employer.
