[Mono-bugs] [Bug 62829][Nor] Changed - TypeBuilder.AddDeclarativeSecurity

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Thu, 16 Sep 2004 11:30:02 -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=62829

--- shadow/62829	2004-08-10 18:24:17.000000000 -0400
+++ shadow/62829.tmp.5118	2004-09-16 11:30:02.000000000 -0400
@@ -1,14 +1,14 @@
 Bug#: 62829
 Product: Mono: Class Libraries
 Version: unspecified
-OS: 
+OS: unknown
 OS Details: 
-Status: NEW   
+Status: NEEDINFO   
 Resolution: 
-Severity: 
+Severity: Unknown
 Priority: Normal
 Component: CORLIB
 AssignedTo: mono-bugs@ximian.com                            
 ReportedBy: marek.safar@seznam.cz               
 QAContact: mono-bugs@ximian.com
 TargetMilestone: ---
@@ -22,6 +22,40 @@
 
 TypeBuilder.AddDeclarativeSecurity doesn't work as expected. When I call
 this method no security data are generated/saves in contrast to
 MethodBuilder.AddDeclarativeSecurity which works.
 
 If you need more info let me know.
+
+------- Additional Comments From sebastien@ximian.com  2004-09-16 11:30 -------
+Marek,
+
+This seems to work for me (using your MCS patch). I added a CWL in
+TypeBuilder.AddDeclarativeSecurity and got this output. Source code
+for decl_all.cs and the monodis (requires patch in #66035 - or use MS
+ildasm) are attached.
+
+# mcs decl_all.cs
+TypeBuilder LinkDemandStruct - <PermissionSet
+class="System.Security.PermissionSet"
+               version="1">
+   <IPermission class="System.Security.Permissions.SecurityPermission,
+mscorlib, Version=1.0.5000.0, Culture=neutral,
+PublicKeyToken=b77a5c561934e089"
+                version="1"
+                Flags="ControlPrincipal"/>
+</PermissionSet>
+ 
+TypeBuilder Program - <PermissionSet class="System.Security.PermissionSet"
+               version="1">
+   <IPermission class="System.Security.Permissions.SecurityPermission,
+mscorlib, Version=1.0.5000.0, Culture=neutral,
+PublicKeyToken=b77a5c561934e089"
+                version="1"
+                Flags="ControlAppDomain"/>
+</PermissionSet>
+
+Do you have a non working example ?
+
+Oh, BTW the assembly permissions do not show up in the assembly
+metadata (I'm looking into this now).
+