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

Unified Diff: sandbox/win/sandbox_poc/pocdll/registry.cc

Issue 1851213002: Remove sandbox on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix nacl compile issues Created 4 years, 9 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/win/sandbox_poc/pocdll/processes_and_threads.cc ('k') | sandbox/win/sandbox_poc/pocdll/spyware.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/win/sandbox_poc/pocdll/registry.cc
diff --git a/sandbox/win/sandbox_poc/pocdll/registry.cc b/sandbox/win/sandbox_poc/pocdll/registry.cc
deleted file mode 100644
index 5784db65d0b5dbb12576d7ed72a81af9793f3eda..0000000000000000000000000000000000000000
--- a/sandbox/win/sandbox_poc/pocdll/registry.cc
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "sandbox/win/sandbox_poc/pocdll/exports.h"
-#include "sandbox/win/sandbox_poc/pocdll/utils.h"
-
-// This file contains the tests used to verify the security of the registry.
-
-// Tries to open the key hive\path and outputs the result.
-// "output" is the stream used for logging.
-void TryOpenKey(const HKEY hive,
- const wchar_t* hive_name,
- const wchar_t* path,
- FILE* output) {
- HKEY key;
- LONG err_code = ::RegOpenKeyEx(hive,
- path,
- 0, // Reserved, must be 0.
- MAXIMUM_ALLOWED,
- &key);
- if (ERROR_SUCCESS == err_code) {
- fprintf(output,
- "[GRANTED] Opening key \"%S\\%S\". Handle 0x%p\r\n",
- hive_name,
- path,
- key);
- ::RegCloseKey(key);
- } else {
- fprintf(output,
- "[BLOCKED] Opening key \"%S\\%S\". Error %ld\r\n",
- hive_name,
- path,
- err_code);
- }
-}
-
-void POCDLL_API TestRegistry(HANDLE log) {
- HandleToFile handle2file;
- FILE *output = handle2file.Translate(log, "w");
-
- TryOpenKey(HKEY_LOCAL_MACHINE, L"HKEY_LOCAL_MACHINE", NULL, output);
- TryOpenKey(HKEY_CURRENT_USER, L"HKEY_CURRENT_USER", NULL, output);
- TryOpenKey(HKEY_USERS, L"HKEY_USERS", NULL, output);
- TryOpenKey(HKEY_LOCAL_MACHINE,
- L"HKEY_LOCAL_MACHINE",
- L"Software\\Microsoft\\Windows NT\\CurrentVersion\\WinLogon",
- output);
-}
« no previous file with comments | « sandbox/win/sandbox_poc/pocdll/processes_and_threads.cc ('k') | sandbox/win/sandbox_poc/pocdll/spyware.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698