* 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
+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.
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;
}