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

Unified Diff: sandbox/src/registry_dispatcher.cc

Issue 20287: In windows 7 there is a new Reg call that we need to... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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 | « sandbox/src/nt_internals.h ('k') | sandbox/src/registry_interception.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/src/registry_dispatcher.cc
===================================================================
--- sandbox/src/registry_dispatcher.cc (revision 9582)
+++ sandbox/src/registry_dispatcher.cc (working copy)
@@ -6,6 +6,7 @@
#include "base/logging.h"
#include "base/scoped_handle_win.h"
+#include "base/win_util.h"
#include "sandbox/src/crosscall_client.h"
#include "sandbox/src/interception.h"
#include "sandbox/src/ipc_tags.h"
@@ -60,8 +61,12 @@
if (IPC_NTCREATEKEY_TAG == service)
return INTERCEPT_NT(manager, NtCreateKey, "_TargetNtCreateKey@32");
- if (IPC_NTOPENKEY_TAG == service)
- return INTERCEPT_NT(manager, NtOpenKey, "_TargetNtOpenKey@16");
+ if (IPC_NTOPENKEY_TAG == service) {
+ bool result = INTERCEPT_NT(manager, NtOpenKey, "_TargetNtOpenKey@16");
+ if (win_util::GetWinVersion() >= win_util::WINVERSION_WIN7)
+ result &= INTERCEPT_NT(manager, NtOpenKeyEx, "_TargetNtOpenKeyEx@20");
+ return result;
+ }
return false;
}
« no previous file with comments | « sandbox/src/nt_internals.h ('k') | sandbox/src/registry_interception.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698