Permalink
Browse files

2009-10-23 Sebastien Pouliot <sebastien@ximian.com>

	* security-manager.c: Report if core-clr is active from
	ves_icall_System_Security_SecurityManager_get_SecurityEnabled
	to allow Moonlight BCL to behave appropriately (both in browser
	and outside, e.g. smcs)


svn path=/trunk/mono/; revision=144737
  • Loading branch information...
1 parent 9587f2d commit 836ebd8cdc43bdc96f14f98222e4edcc0350a108 Sebastien Pouliot committed Oct 23, 2009
Showing with 13 additions and 2 deletions.
  1. +7 −0 mono/metadata/ChangeLog
  2. +6 −2 mono/metadata/security-manager.c
View
@@ -1,3 +1,10 @@
+2009-10-23 Sebastien Pouliot <sebastien@ximian.com>
+
+ * security-manager.c: Report if core-clr is active from
+ ves_icall_System_Security_SecurityManager_get_SecurityEnabled
+ to allow Moonlight BCL to behave appropriately (both in browser
+ and outside, e.g. smcs)
+
2009-10-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
* mono-config.c: ignore UTF-8 BOM and report parser errors.
@@ -234,8 +234,12 @@ mono_get_context_capture_method (void)
MonoBoolean
ves_icall_System_Security_SecurityManager_get_SecurityEnabled (void)
{
- if (!mono_security_manager_activated)
- return FALSE;
+ if (!mono_security_manager_activated) {
+ /* SecurityManager is internal for Moonlight and SecurityEnabled is used to know if CoreCLR is active
+ * (e.g. plugin executing in the browser) or not (e.g. smcs compiling source code with corlib 2.1)
+ */
+ return (mono_security_get_mode () == MONO_SECURITY_MODE_CORE_CLR);
+ }
return mono_security_manager_enabled;
}

0 comments on commit 836ebd8

Please sign in to comment.