summaryrefslogtreecommitdiff
path: root/core/jni/fd_utils.cpp
diff options
context:
space:
mode:
authorChris Gross <chrisgross@google.com>2020-04-24 09:35:01 -0700
committerChris Gross <chrisgross@google.com>2020-05-04 15:27:38 +0000
commit4943c3eab4cafb24ac07382a6549b4307d030a63 (patch)
tree18a2c04906fc152bd22125d49b4ee8354024ba82 /core/jni/fd_utils.cpp
parentb9c89bb3fa1d184c0a740f7b80ebdf8356fbdf9b (diff)
Allow bootjars in system_ext.
Bug: 148385042 Test: Built and booted Pixel 3a both with and without a boot jar in system_ext. Change-Id: I14274b6906eaf6ff1999f8aa0232f7fc0e8aec0b
Diffstat (limited to 'core/jni/fd_utils.cpp')
-rw-r--r--core/jni/fd_utils.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/core/jni/fd_utils.cpp b/core/jni/fd_utils.cpp
index ca4735ec665a..df3666ddfce2 100644
--- a/core/jni/fd_utils.cpp
+++ b/core/jni/fd_utils.cpp
@@ -81,11 +81,18 @@ bool FileDescriptorWhitelist::IsAllowed(const std::string& path) const {
}
// Framework jars are allowed.
- static const char* kFrameworksPrefix = "/system/framework/";
+ static const char* kFrameworksPrefix[] = {
+ "/system/framework/",
+ "/system_ext/framework/",
+ };
+
static const char* kJarSuffix = ".jar";
- if (android::base::StartsWith(path, kFrameworksPrefix)
- && android::base::EndsWith(path, kJarSuffix)) {
- return true;
+
+ for (const auto& frameworks_prefix : kFrameworksPrefix) {
+ if (android::base::StartsWith(path, frameworks_prefix)
+ && android::base::EndsWith(path, kJarSuffix)) {
+ return true;
+ }
}
// Jars from the ART APEX are allowed.