diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2019-01-24 07:18:08 -0800 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2019-01-24 07:18:08 -0800 |
commit | 574c6134dd6c26ff0edc348a3d02f003e4ca95f2 (patch) | |
tree | bed4f5c0369af8fde6547345c5551e66e5cd2f42 /core/jni/fd_utils.cpp | |
parent | 06928f442249220e3318db11e0081502ef758aba (diff) | |
parent | 319db3e9f76ca939aba26e8059bcec119f370877 (diff) |
Merge "Add jar files from the runtime APEX in the whitelist." am: 4d3a2f95c6 am: b5a3c59d3a
am: 319db3e9f7
Change-Id: I08b7c53b7676966fa2f4cb6cea03b8f6dc7d9c4a
Diffstat (limited to 'core/jni/fd_utils.cpp')
-rw-r--r-- | core/jni/fd_utils.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/jni/fd_utils.cpp b/core/jni/fd_utils.cpp index 53dde80edd89..4e486630adae 100644 --- a/core/jni/fd_utils.cpp +++ b/core/jni/fd_utils.cpp @@ -72,6 +72,7 @@ bool FileDescriptorWhitelist::IsAllowed(const std::string& path) const { return true; } + // Framework jars are allowed. static const char* kFrameworksPrefix = "/system/framework/"; static const char* kJarSuffix = ".jar"; if (android::base::StartsWith(path, kFrameworksPrefix) @@ -79,6 +80,13 @@ bool FileDescriptorWhitelist::IsAllowed(const std::string& path) const { return true; } + // Jars from the runtime apex are allowed. + static const char* kRuntimeApexPrefix = "/apex/com.android.runtime/javalib/"; + if (android::base::StartsWith(path, kRuntimeApexPrefix) + && android::base::EndsWith(path, kJarSuffix)) { + return true; + } + // Whitelist files needed for Runtime Resource Overlay, like these: // /system/vendor/overlay/framework-res.apk // /system/vendor/overlay-subdir/pg/framework-res.apk |