summaryrefslogtreecommitdiff
path: root/cmds/installd/utils.cpp
diff options
context:
space:
mode:
author shafik <shafik@google.com> 2019-02-19 12:19:48 +0000
committer Shafik Nassar <shafik@google.com> 2019-02-20 14:52:30 +0000
commitb43faa9d8f1428a3fb2ee190dbd19074320ed1fe (patch)
tree69d628b669f9158b98614ce8b55d772095ca4409 /cmds/installd/utils.cpp
parentcf867594cf11c27855578d9554658f3fbee4e32f (diff)
Whitelist the staging directory in installd
Make the path /data/pkg_staging a valid path for APK and APEX files, inorder to allow the deletion of APEX files after their corresponding sessions reach a final state. Bug: 123624108 Test: manual - trigger APEX deletion from the mentioned directory Change-Id: I9bf03c924080e8c75a6c0e9d163460d365061487
Diffstat (limited to 'cmds/installd/utils.cpp')
-rw-r--r--cmds/installd/utils.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/cmds/installd/utils.cpp b/cmds/installd/utils.cpp
index 5b487bb515..f2452725e3 100644
--- a/cmds/installd/utils.cpp
+++ b/cmds/installd/utils.cpp
@@ -892,6 +892,8 @@ bool validate_secondary_dex_path(const std::string& pkgname, const std::string&
static int validate_apk_path_internal(const std::string& path, int maxSubdirs) {
if (validate_path(android_app_dir, path, maxSubdirs) == 0) {
return 0;
+ } else if (validate_path(android_staging_dir, path, maxSubdirs) == 0) {
+ return 0;
} else if (validate_path(android_app_private_dir, path, maxSubdirs) == 0) {
return 0;
} else if (validate_path(android_app_ephemeral_dir, path, maxSubdirs) == 0) {