Skip to content

Commit

Permalink
Bug Fix: OpenSubKey will open key as writable when RegistryKeyPermiss…
Browse files Browse the repository at this point in the history
…ionCheck is set to ReadWriteSubTree
  • Loading branch information
TalAloni authored and kumpera committed Mar 19, 2012
1 parent 5ae8462 commit dacbfab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mcs/class/corlib/Microsoft.Win32/RegistryKey.cs
Expand Up @@ -568,14 +568,14 @@ public static RegistryKey OpenBaseKey (RegistryHive hKey, RegistryView view)
[MonoLimitation ("permissionCheck is ignored in Mono")]
public RegistryKey OpenSubKey (string name, RegistryKeyPermissionCheck permissionCheck)
{
return OpenSubKey (name);
return OpenSubKey (name, permissionCheck == RegistryKeyPermissionCheck.ReadWriteSubTree);
}

[ComVisible (false)]
[MonoLimitation ("permissionCheck and rights are ignored in Mono")]
public RegistryKey OpenSubKey (string name, RegistryKeyPermissionCheck permissionCheck, RegistryRights rights)
{
return OpenSubKey (name);
return OpenSubKey (name, permissionCheck == RegistryKeyPermissionCheck.ReadWriteSubTree);
}

public void SetAccessControl (RegistrySecurity registrySecurity)
Expand Down

0 comments on commit dacbfab

Please sign in to comment.