summaryrefslogtreecommitdiff
path: root/core/jni/fd_utils.cpp
diff options
context:
space:
mode:
authorChris Gross <chrisgross@google.com>2020-05-05 21:34:01 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-05-05 21:34:01 +0000
commitec82e99ca639918d868765e9152c7820a99f34af (patch)
tree8418cd2d65991a693fda025b78386f09669f5afe /core/jni/fd_utils.cpp
parent8724137da50e520cec106ac659f1e0425d666930 (diff)
parent4ab8f542e9582417902aa42f208839df8f09485b (diff)
Merge "Allow bootjars in system_ext." am: 6abe4fb0a7 am: 4ab8f542e9
Change-Id: I470d4f21af77265926ceb3a9b2bcfd08809e813b
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 c72668f84fb1..6d2d4034d9e3 100644
--- a/core/jni/fd_utils.cpp
+++ b/core/jni/fd_utils.cpp
@@ -85,11 +85,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.