* Environment.cs: Ensure elevated trust when calling
authorSebastien Pouliot <sebastien@ximian.com>
Fri, 16 Apr 2010 17:28:41 +0000 (17:28 -0000)
committerSebastien Pouliot <sebastien@ximian.com>
Fri, 16 Apr 2010 17:28:41 +0000 (17:28 -0000)
GetFolderPath on Moonlight

2010-04-16  Sebastien Pouliot  <sebastien@ximian.com>

svn path=/trunk/mcs/; revision=155642

mcs/class/corlib/System/ChangeLog
mcs/class/corlib/System/Environment.cs

index 68ce1e5234fa97c3605fc9c9d9b7ff4fe9d537d5..cd4e3ca0b25f9d51d1ee33315dddf7a25ec23481 100644 (file)
@@ -1,3 +1,8 @@
+2010-04-16  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * Environment.cs: Ensure elevated trust when calling
+       GetFolderPath on Moonlight
+
 2010-04-16  Sebastien Pouliot  <sebastien@ximian.com>
 
        * Action.cs: SL4 moved some Action in mscorlib
index 0349accaac06209a9643f50b1f6a42465844b8be..91e02d48e58781e6b323b30f1a0728e30f38fe79 100644 (file)
@@ -452,6 +452,8 @@ namespace System {
 #endif
                static string GetFolderPath(SpecialFolder folder, SpecialFolderOption option)
                {
+                       SecurityManager.EnsureElevatedPermissions (); // this is a no-op outside moonlight
+
                        string dir = null;
 
                        if (Environment.IsRunningOnWindows) {