summaryrefslogtreecommitdiff
path: root/core/jni/fd_utils.cpp
diff options
context:
space:
mode:
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.