summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Narayan Kamath <narayan@google.com> 2016-11-09 11:26:09 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2016-11-09 11:26:13 +0000
commit75c6b8c324bc57755e74eef7a9ad67fcbac5c848 (patch)
tree42feff59dffd963817b0e0357169bc9a15ce6444
parentb3b03a9d787d92eb0865e23fe47034fb1b685a43 (diff)
parent5e2f7c6229d7191183888d685b57a7d0a2835fce (diff)
Merge "Zygote: Additional whitelisting for legacy devices." into mnc-dev
-rw-r--r--core/jni/fd_utils-inl.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/jni/fd_utils-inl.h b/core/jni/fd_utils-inl.h
index 6f1e231b550d..064e2ed88afc 100644
--- a/core/jni/fd_utils-inl.h
+++ b/core/jni/fd_utils-inl.h
@@ -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;
}