3 using System.Security.Permissions;
4 using System.Security.Principal;
6 [PrincipalPermission (SecurityAction.InheritanceDemand, Name="me", Role="mono hacker")]
7 class BaseInheritanceDemand {
11 Console.WriteLine ("*1* [this should NOT print]");
15 class InheritanceDemand : BaseInheritanceDemand {
18 static int Main (string[] args)
21 new InheritanceDemand ().Test ();
22 // this makes unhandled fails in the Makefile
25 catch (SecurityException se) {
26 // actually we'll get an unhandled exception unless the
27 // user is called "me" and part of the "mono hacker" group
28 Console.WriteLine ("*2* Unexpected SecurityException\n{0}", se);
32 Console.WriteLine ("*3* Unexpected Exception\n{0}", e);