summaryrefslogtreecommitdiffstats
path: root/sandbox/src
diff options
context:
space:
mode:
Diffstat (limited to 'sandbox/src')
-rw-r--r--sandbox/src/nt_internals.h2
-rw-r--r--sandbox/src/registry_interception.cc12
-rw-r--r--sandbox/src/registry_interception.h2
3 files changed, 8 insertions, 8 deletions
diff --git a/sandbox/src/nt_internals.h b/sandbox/src/nt_internals.h
index a2cb751..1e664d7 100644
--- a/sandbox/src/nt_internals.h
+++ b/sandbox/src/nt_internals.h
@@ -358,7 +358,7 @@ typedef NTSTATUS (WINAPI *NtOpenKeyExFunction)(
OUT PHANDLE KeyHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes,
- IN DWORD unknown); // TODO(nsylvain): define this. bug 7611
+ IN DWORD open_options);
// -----------------------------------------------------------------------
// Memory
diff --git a/sandbox/src/registry_interception.cc b/sandbox/src/registry_interception.cc
index 2ecfa4a..aaeab92 100644
--- a/sandbox/src/registry_interception.cc
+++ b/sandbox/src/registry_interception.cc
@@ -155,15 +155,15 @@ NTSTATUS WINAPI TargetNtOpenKey(NtOpenKeyFunction orig_OpenKey, PHANDLE key,
NTSTATUS WINAPI TargetNtOpenKeyEx(NtOpenKeyExFunction orig_OpenKeyEx,
PHANDLE key, ACCESS_MASK desired_access,
POBJECT_ATTRIBUTES object_attributes,
- DWORD unknown) {
+ DWORD open_options) {
// Check if the process can open it first.
NTSTATUS status = orig_OpenKeyEx(key, desired_access, object_attributes,
- unknown);
+ open_options);
- // TODO(nsylvain): We don't know what the last parameter is. If it's not
- // zero, we don't attempt to proxy the call. We need to find out what it is!
- // See bug 7611
- if (NT_SUCCESS(status) || unknown != 0)
+ // We do not support open_options at this time. The 2 current known values
+ // are REG_OPTION_CREATE_LINK, to open a symbolic link, and
+ // REG_OPTION_BACKUP_RESTORE to open the key with special privileges.
+ if (NT_SUCCESS(status) || open_options != 0)
return status;
return CommonNtOpenKey(status, key, desired_access, object_attributes);
diff --git a/sandbox/src/registry_interception.h b/sandbox/src/registry_interception.h
index ff08016..e92cc22 100644
--- a/sandbox/src/registry_interception.h
+++ b/sandbox/src/registry_interception.h
@@ -29,7 +29,7 @@ SANDBOX_INTERCEPT NTSTATUS WINAPI TargetNtOpenKey(
// It should never be called directly
SANDBOX_INTERCEPT NTSTATUS WINAPI TargetNtOpenKeyEx(
NtOpenKeyExFunction orig_OpenKeyEx, PHANDLE key, ACCESS_MASK desired_access,
- POBJECT_ATTRIBUTES object_attributes, DWORD unknown);
+ POBJECT_ATTRIBUTES object_attributes, DWORD open_options);
} // extern "C"