diff options
Diffstat (limited to 'core/jni/fd_utils.cpp')
-rw-r--r-- | core/jni/fd_utils.cpp | 15 |
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. |