projects
/
mono.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
2007-07-09 Mark Probst <mark.probst@gmail.com>
[mono.git]
/
mono
/
mini
/
declsec.h
diff --git
a/mono/mini/declsec.h
b/mono/mini/declsec.h
index aa6e48ed10f34d82ff14daf108154d7ef6b62d57..d90ab84e13074b210669d2aa739d47ccf165cf1d 100644
(file)
--- a/
mono/mini/declsec.h
+++ b/
mono/mini/declsec.h
@@
-4,7
+4,7
@@
* Author:
* Sebastien Pouliot <sebastien@ximian.com>
*
* Author:
* Sebastien Pouliot <sebastien@ximian.com>
*
- * (C) 2004 Novell (http://www.novell.com)
+ * (C) 2004
-2005
Novell (http://www.novell.com)
*/
#ifndef _MONO_MINI_DECLSEC_H_
*/
#ifndef _MONO_MINI_DECLSEC_H_
@@
-16,12
+16,25
@@
#include "mono/metadata/domain-internals.h"
#include "mono/metadata/object.h"
#include "mono/metadata/tabledefs.h"
#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 */
/* Definitions */
+#define MONO_SECMAN_FLAG_INIT(x) (x & 0x2)
+#define MONO_SECMAN_FLAG_GET_VALUE(x) (x & 0x1)
+#define MONO_SECMAN_FLAG_SET_VALUE(x,y) do { x = ((y) ? 0x3 : 0x2); } while (0)
+
+#define MONO_CAS_INITIAL_STACK_SIZE 6
+
+
+/* keep in synch with RuntimeSecurityFrame in /mcs/class/corlib/System.Security/SecurityFrame.cs */
typedef struct {
MonoObject obj;
typedef struct {
MonoObject obj;
+ MonoAppDomain *domain;
MonoReflectionMethod *method;
MonoDeclSecurityEntry assert;
MonoDeclSecurityEntry deny;
MonoReflectionMethod *method;
MonoDeclSecurityEntry assert;
MonoDeclSecurityEntry deny;
@@
-36,9
+49,19
@@
enum {
MONO_JITINFO_STACKMOD_PERMITONLY = 0x04
};
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 */
/* 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_ */
#endif /* _MONO_MINI_DECLSEC_H_ */