Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(305)

Unified Diff: content/common/sandbox_win.cc

Issue 430753002: Resolve registry root paths in HandleCloser (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | sandbox/win/src/handle_closer.cc » ('j') | sandbox/win/src/handle_closer.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/sandbox_win.cc
diff --git a/content/common/sandbox_win.cc b/content/common/sandbox_win.cc
index b56b74a8f0f1736c71aa3b92c3be0953f39121a4..1005b69b434ae1617ca66b4f52294f584d215efd 100644
--- a/content/common/sandbox_win.cc
+++ b/content/common/sandbox_win.cc
@@ -349,13 +349,18 @@ bool AddPolicyForSandboxedProcess(sandbox::TargetPolicy* policy) {
// Win8+ adds a device DeviceApi that we don't need.
if (base::win::GetVersion() > base::win::VERSION_WIN7)
- policy->AddKernelObjectToClose(L"File", L"\\Device\\DeviceApi");
+ result = policy->AddKernelObjectToClose(L"File", L"\\Device\\DeviceApi");
+ if (result != sandbox::SBOX_ALL_OK)
+ return false;
// Close the proxy settings on XP.
if (base::win::GetVersion() <= base::win::VERSION_SERVER_2003)
- policy->AddKernelObjectToClose(L"Key",
- L"HKCU\\Software\\Microsoft\\Windows\\" \
- L"CurrentVersion\\Internet Settings");
+ result = policy->AddKernelObjectToClose(L"Key",
+ L"HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\" \
+ L"CurrentVersion\\Internet Settings");
+ if (result != sandbox::SBOX_ALL_OK)
+ return false;
+
sandbox::TokenLevel initial_token = sandbox::USER_UNPROTECTED;
if (base::win::GetVersion() > base::win::VERSION_XP) {
« no previous file with comments | « no previous file | sandbox/win/src/handle_closer.cc » ('j') | sandbox/win/src/handle_closer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698