X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fmini%2Fdeclsec.h;h=4c45a94171b1fa1c66af3158d08e7d70016c09fe;hb=1a608685342027c7802a6124924949232a424760;hp=aa6e48ed10f34d82ff14daf108154d7ef6b62d57;hpb=76f1de4da7af229e06f325632a52d70d781492bf;p=mono.git diff --git a/mono/mini/declsec.h b/mono/mini/declsec.h index aa6e48ed10f..4c45a94171b 100644 --- a/mono/mini/declsec.h +++ b/mono/mini/declsec.h @@ -4,7 +4,7 @@ * Author: * Sebastien Pouliot * - * (C) 2004 Novell (http://www.novell.com) + * (C) 2004-2005 Novell (http://www.novell.com) */ #ifndef _MONO_MINI_DECLSEC_H_ @@ -16,12 +16,21 @@ #include "mono/metadata/domain-internals.h" #include "mono/metadata/object.h" #include "mono/metadata/tabledefs.h" +#include "mono/metadata/marshal.h" +#include "mono/metadata/security-manager.h" +#include "mono/metadata/exception.h" +#include "mono/utils/mono-compiler.h" /* Definitions */ +#define MONO_CAS_INITIAL_STACK_SIZE 6 + + +/* keep in synch with RuntimeSecurityFrame in /mcs/class/corlib/System.Security/SecurityFrame.cs */ typedef struct { MonoObject obj; + MonoAppDomain *domain; MonoReflectionMethod *method; MonoDeclSecurityEntry assert; MonoDeclSecurityEntry deny; @@ -36,9 +45,19 @@ enum { MONO_JITINFO_STACKMOD_PERMITONLY = 0x04 }; +enum { + MONO_JIT_SECURITY_OK = 0x00, + MONO_JIT_LINKDEMAND_PERMISSION = 0x01, + MONO_JIT_LINKDEMAND_APTC = 0x02, + MONO_JIT_LINKDEMAND_ECMA = 0x04, + MONO_JIT_LINKDEMAND_PINVOKE = 0x08 +}; + /* Prototypes */ -MonoBoolean mono_method_has_declsec (MonoMethod *method); -void mono_declsec_cache_stack_modifiers (MonoJitInfo *jinfo); -MonoSecurityFrame* mono_declsec_create_frame (MonoDomain *domain, MonoJitInfo *jinfo); +MonoBoolean mono_method_has_declsec (MonoMethod *method) MONO_INTERNAL; +void mono_declsec_cache_stack_modifiers (MonoJitInfo *jinfo) MONO_INTERNAL; +MonoSecurityFrame* mono_declsec_create_frame (MonoDomain *domain, MonoJitInfo *jinfo) MONO_INTERNAL; + +guint32 mono_declsec_linkdemand (MonoDomain *domain, MonoMethod *caller, MonoMethod *callee) MONO_INTERNAL; #endif /* _MONO_MINI_DECLSEC_H_ */