OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_ELF_BLACKLIST_BLACKLIST_H_ | 5 #ifndef CHROME_ELF_BLACKLIST_BLACKLIST_H_ |
6 #define CHROME_ELF_BLACKLIST_BLACKLIST_H_ | 6 #define CHROME_ELF_BLACKLIST_BLACKLIST_H_ |
7 | 7 |
8 #if defined(_WIN64) | 8 #if defined(_WIN64) |
9 #include "sandbox/win/src/sandbox_nt_types.h" | 9 #include "sandbox/win/src/sandbox_nt_types.h" |
10 #endif | 10 #endif |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 // Returns a list of all the dlls that have been successfully blocked by the | 55 // Returns a list of all the dlls that have been successfully blocked by the |
56 // blacklist via blocked_dlls, if there is enough space (according to |size|). | 56 // blacklist via blocked_dlls, if there is enough space (according to |size|). |
57 // |size| will always be modified to be the number of dlls that were blocked. | 57 // |size| will always be modified to be the number of dlls that were blocked. |
58 // The caller doesn't own the strings and isn't expected to free them. These | 58 // The caller doesn't own the strings and isn't expected to free them. These |
59 // strings won't be hanging unless RemoveDllFromBlacklist is called, but it | 59 // strings won't be hanging unless RemoveDllFromBlacklist is called, but it |
60 // is only exposed in tests (and should stay that way). | 60 // is only exposed in tests (and should stay that way). |
61 extern "C" void SuccessfullyBlocked(const wchar_t** blocked_dlls, int* size); | 61 extern "C" void SuccessfullyBlocked(const wchar_t** blocked_dlls, int* size); |
62 | 62 |
63 // Add the dlls, originally passed in through finch, from the registry to the | 63 // Add the dlls, originally passed in through finch, from the registry to the |
64 // blacklist so that they will be blocked identically to those hard coded in. | 64 // blacklist so that they will be blocked identically to those hard coded in. |
65 extern "C" bool AddDllsFromRegistryToBlacklist(); | 65 extern "C" void AddDllsFromRegistryToBlacklist(); |
66 | 66 |
67 // Record that the dll at the given index was blocked. | 67 // Record that the dll at the given index was blocked. |
68 void BlockedDll(size_t blocked_index); | 68 void BlockedDll(size_t blocked_index); |
69 | 69 |
70 // Initializes the DLL blacklist in the current process. This should be called | 70 // Initializes the DLL blacklist in the current process. This should be called |
71 // before any undesirable DLLs might be loaded. If |force| is set to true, then | 71 // before any undesirable DLLs might be loaded. If |force| is set to true, then |
72 // initialization will take place even if a beacon is present. This is useful | 72 // initialization will take place even if a beacon is present. This is useful |
73 // for tests. | 73 // for tests. |
74 bool Initialize(bool force); | 74 bool Initialize(bool force); |
75 | 75 |
76 } // namespace blacklist | 76 } // namespace blacklist |
77 | 77 |
78 #endif // CHROME_ELF_BLACKLIST_BLACKLIST_H_ | 78 #endif // CHROME_ELF_BLACKLIST_BLACKLIST_H_ |
OLD | NEW |