[Mono-devel-list] CAS - Patch - Code generation for declarative security demands
Sebastien Pouliot
sebastien at ximian.com
Tue Dec 21 14:25:38 EST 2004
Hello,
Another CAS patch before xmas...
Declarative demands (i.e. Demand, NonCasDemand and DemandChoice) must be
executed before the method code. So the JIT has to check every method it
compile to see if declarative demands are applicable.
This patch add code to mono_method_to_ir to:
1. detect if declarative security attributes are applicable to the
compiled method (attribute on the method or it's class);
2. check if the security action is Demand, NonCasDemand or DemandChoice;
3. get the applicable (method level as priority over class level
actions) permissions set informations (pointer and size) from metadata.
4. generate a call for present actions
Attached to this email are the patch to mono (mini.c) and two additional
files (in metadata) for the security manager (currently limited to
initialization).
--
Sebastien Pouliot <sebastien at ximian.com>
blog: http://pages.infinit.net/ctech/poupou.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mono.20041221.diff
Type: text/x-patch
Size: 3748 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20041221/5b042b83/attachment.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: security-manager.c
Type: text/x-csrc
Size: 1019 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20041221/5b042b83/attachment-0001.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: security-manager.h
Type: text/x-chdr
Size: 1124 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20041221/5b042b83/attachment-0002.bin
More information about the Mono-devel-list
mailing list