diff --git a/core/jni/fd_utils-inl.h b/core/jni/fd_utils-inl.h index 3f91feb254d72..d1129a3ef5930 100644 --- a/core/jni/fd_utils-inl.h +++ b/core/jni/fd_utils-inl.h @@ -293,6 +293,12 @@ class FileDescriptorInfo { return true; } + // All regular files that are placed under this path are whitelisted automatically. + static const std::string kZygoteWhitelistPath = "/vendor/zygote_whitelist/"; + if (StartsWith(path, kZygoteWhitelistPath) && path.find("/../") == std::string::npos) { + return true; + } + return false; }