[Mono-list] Declarative security issues

Paolo Molaro lupus@ximian.com
Mon, 29 Jul 2002 11:27:31 +0200


On 07/28/02 Hinne Hettema wrote: 
> I've 'discovered' that mcs seems to compile the declarative security options
> into custom attributes. I'm wondering if this is intended behaviour or a
> bug? I have a 'linux only' setup and cannot compile this under Windows with
> csc, the idea would be to do this and see where the declsecurity structures
> end up in the metadata (to smoke out possible bugs in the cs code itself.).
[...]
> Can someone enlighten me here? Thanks,

There are two parts in solving this issue:
1) support in mcs
2) support in Reflection

mcs needs to recognize the special attributes, build the PermissionSet
and call the AddDeclarativeSecurity method on the
TypeBuilder/MethodBuilder.
Reflection needs to serialize the permission set and add the row to the
metadata table.

> PS: I 'discovered' this while attempting to extend monodis (dump.c) to show
> the declarative security, and my test code showed the tables up

BTW, support for dumping the declsecurity table in monodis is already in cvs.

lupus

-- 
-----------------------------------------------------------------
lupus@debian.org                                     debian/rules
lupus@ximian.com                             Monkeys do it better