summaryrefslogtreecommitdiff
path: root/core/jni/fd_utils.cpp
diff options
context:
space:
mode:
authorChris Gross <chrisgross@google.com>2020-05-05 21:54:43 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-05-05 21:54:43 +0000
commit3e9216c62821954fd9bb6588a185c92a178322e6 (patch)
tree548230747efcf0d7287087e2341d631d15a61f8b /core/jni/fd_utils.cpp
parentaa2b2923d5b6b2a0fc0f139536bc41b514c6e22a (diff)
parente0e5f15a12060add5ccfe5aad849c72eadab1781 (diff)
Merge "Allow bootjars in system_ext." am: 6abe4fb0a7 am: 4ab8f542e9 am: ec82e99ca6 am: 1f3fa889d4 am: e0e5f15a12
Change-Id: Iecc48ad20eec19aeaa1157c7e9a2928a299573e8
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 cfd3c0915002..3920ec7cee3d 100644
--- a/core/jni/fd_utils.cpp
+++ b/core/jni/fd_utils.cpp
@@ -86,11 +86,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.