OSDN Git Service

Zygote: Additional whitelisting for legacy devices.
[android-x86/frameworks-base.git] / core / jni / fd_utils-inl.h
index 6f1e231..064e2ed 100644 (file)
@@ -295,6 +295,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;
   }