diff options
author | Linquize <linquize@yahoo.com.hk> | 2013-09-17 22:57:30 +0800 |
---|---|---|
committer | Linquize <linquize@yahoo.com.hk> | 2013-09-17 22:57:30 +0800 |
commit | 89095fbddcba3c3e27d0573bc7202ca9a5f4f00b (patch) | |
tree | 217b015c30f4aeb27881e42a4ceae6ba9850d94f /src | |
parent | ffbd337aefae76a646bafd6e5f3c1edc18400f05 (diff) | |
download | libgit2-89095fbddcba3c3e27d0573bc7202ca9a5f4f00b.tar.gz |
Fix failure in win32_find_git_in_registry() when UAC is turned on
Demand read only access to registry key instead of full access.
This might happen in Windows Vista and later.
Diffstat (limited to 'src')
-rw-r--r-- | src/win32/findfile.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/win32/findfile.c b/src/win32/findfile.c index eb83178a5..d8b8f60ca 100644 --- a/src/win32/findfile.c +++ b/src/win32/findfile.c @@ -132,7 +132,7 @@ static int win32_find_git_in_registry( path16.len = MAX_PATH; - if (RegOpenKeyExW(hieve, key, 0, KEY_ALL_ACCESS, &hKey) == ERROR_SUCCESS) { + if (RegOpenKeyExW(hieve, key, 0, KEY_READ, &hKey) == ERROR_SUCCESS) { if (RegQueryValueExW(hKey, L"InstallLocation", NULL, &dwType, (LPBYTE)&path16.path, &path16.len) == ERROR_SUCCESS) { |