[Mono-bugs] [Bug 66035][Nor] New - monodis doesn't disassemble security attributes

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Wed, 15 Sep 2004 14:44:10 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by sebastien@ximian.com.

http://bugzilla.ximian.com/show_bug.cgi?id=66035

--- shadow/66035	2004-09-15 14:44:10.000000000 -0400
+++ shadow/66035.tmp.20682	2004-09-15 14:44:10.000000000 -0400
@@ -0,0 +1,78 @@
+Bug#: 66035
+Product: Mono: Compilers
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Other.
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: sebastien@ximian.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: monodis doesn't disassemble security attributes
+
+Description of Problem:
+monodis doesn't disassemble security attributes encoded in the assembly
+metadata.
+
+Steps to reproduce the problem:
+1. Compile the following source code with CSC (or a Marek's patch for MCS
+with similar results).
+
+using System;
+using System.Security;
+using System.Security.Permissions;
+
+[assembly: SecurityPermission (SecurityAction.RequestMinimum, Execution=true)]
+[assembly: SecurityPermission (SecurityAction.RequestOptional,
+Unrestricted=true)]
+[assembly: SecurityPermission (SecurityAction.RequestRefuse,
+SkipVerification=true)]
+
+[SecurityPermission (SecurityAction.Demand, ControlAppDomain=true)]
+public class Program {
+
+	[SecurityPermission (SecurityAction.Demand, ControlPrincipal=true)]
+	static public void Main (string[] args)
+	{
+		Console.WriteLine ("Hello Mono!");
+	}
+}
+
+2. Use monodis to see the IL
+3. Compare IL with ildasm (windows) output
+
+Actual Results:
+Assembly code is disassembled. Permissions sets are missing.
+
+Expected Results:
+
+.assembly XXX should contains
+.permissionset reqmin = (XX ... XX)
+.permissionset reqopt = (XX ... XX)
+.permissionset reqrefuse = (XX ... XX)
+
+.class ... Program ... should contains
+.permissionset demand = (XX ... XX)
+
+.method ... Main ... should contains
+.permissionset demand = (XX ... XX)
+
+
+How often does this happen? 
+Always
+
+
+Additional Information:
+
+* Current MCS patch won't show all permission sets.
+
+* Mono's ilasm doesn't support .permissionset - see #66033
+
+* Fx 2.0 has a friendler syntax for permission sets
+http://blogs.msdn.com/shawnfa/archive/2004/08/31/223630.aspx