[Mono-dev] [Fwd: [Mono-patches] r92329 - trunk/mcs/class/System.Web/System.Web.Util]

Atsushi Eno atsushi at ximian.com
Mon Jan 7 02:15:27 EST 2008


Is there any reason to differentiate runtime environment shown like
this patch? I don't think we like such approach very much, especially
since our implementation of RuntimeEnvironment.SystemConfigurationFile
is implemented as:

--------
public static string SystemConfigurationFile {
	get {
		// GetMachineConfigPath is internal and not protected by CAS
		string path = Environment.GetMachineConfigPath ();
		if (SecurityManager.SecurityEnabled) {
			new FileIOPermission (FileIOPermissionAccess.PathDiscovery, 
path).Demand ();
		}
		return path;
	}
}
--------

To me it looks that it just tries to skip security assertion.

Atsushi Eno


-------- Original Message --------
Subject: [Mono-patches] r92329 - trunk/mcs/class/System.Web/System.Web.Util
Date: Sun,  6 Jan 2008 03:14:55 -0500 (EST)
From: Igor Zalmanovich (igorz at mainsoft.com) 
<mono-patches-list at lists.ximian.com>
To: mono-patches at lists.ximian.com, ximian.monolist at gmail.com, 
mono-svn-patches-garchive-20758 at googlegroups.com

Author: igorz
Date: 2008-01-06 03:14:55 -0500 (Sun, 06 Jan 2008)
New Revision: 92329

Modified:
    trunk/mcs/class/System.Web/System.Web.Util/ICalls.cs
Log:
added #if TARGET_DOTNET

Modified: trunk/mcs/class/System.Web/System.Web.Util/ICalls.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web.Util/ICalls.cs	2008-01-06 
08:11:36 UTC (rev 92328)
+++ trunk/mcs/class/System.Web/System.Web.Util/ICalls.cs	2008-01-06 
08:14:55 UTC (rev 92329)
@@ -35,8 +35,14 @@
  	{
  		private ICalls () {}

+#if TARGET_DOTNET
+		static public string GetMachineConfigPath () {
+			return 
System.Runtime.InteropServices.RuntimeEnvironment.SystemConfigurationFile;
+		}
+#else
  		[MethodImplAttribute(MethodImplOptions.InternalCall)]
  		extern static public string GetMachineConfigPath ();
+#endif

  		[MethodImplAttribute(MethodImplOptions.InternalCall)]
  		extern static public string GetMachineInstallDirectory ();

_______________________________________________
Mono-patches maillist  -  Mono-patches at lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-patches




More information about the Mono-devel-list mailing list