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

Unified Diff: syzygy/agent/asan/registry_cache.cc

Issue 2378743002: [SyzyAsan] Disable registry filter for sandboxed processes. (Closed)
Patch Set: Created 4 years, 3 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 | « syzygy/agent/asan/registry_cache.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: syzygy/agent/asan/registry_cache.cc
diff --git a/syzygy/agent/asan/registry_cache.cc b/syzygy/agent/asan/registry_cache.cc
index 8d6a42ddc1f925135ae936b87dae9ca7f73820fe..12a3d24151e378f75ffa99942066aff19e925171 100644
--- a/syzygy/agent/asan/registry_cache.cc
+++ b/syzygy/agent/asan/registry_cache.cc
@@ -59,7 +59,18 @@ RegistryCache::RegistryCache(const wchar_t* registry_name,
registry_cache_key_.append(registry_name);
}
+// static
+bool RegistryCache::RegistryAvailable() {
+ base::win::RegKey test_key(kRegistryRootKey, L"SYSTEM", KEY_ALL_ACCESS);
+ if (!test_key.Valid())
+ return false;
+ test_key.Close();
+ return true;
+}
+
bool RegistryCache::Init() {
+ DCHECK(RegistryAvailable());
+
// Always start by cleaning up the values, to limit the size of entries in
// the registry.
CleanUp();
« no previous file with comments | « syzygy/agent/asan/registry_cache.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698