summaryrefslogtreecommitdiffstats
path: root/sandbox/src/registry_dispatcher.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sandbox/src/registry_dispatcher.cc')
-rw-r--r--sandbox/src/registry_dispatcher.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/sandbox/src/registry_dispatcher.cc b/sandbox/src/registry_dispatcher.cc
index babf455..37d607d 100644
--- a/sandbox/src/registry_dispatcher.cc
+++ b/sandbox/src/registry_dispatcher.cc
@@ -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 @@ bool RegistryDispatcher::SetupService(InterceptionManager* manager,
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;
}