summaryrefslogtreecommitdiff
path: root/cmds/idmap2/libidmap2/ResourceContainer.cpp
diff options
context:
space:
mode:
authorRyan Mitchell <rtmitchell@google.com>2021-05-11 12:21:29 -0700
committerRyan Mitchell <rtmitchell@google.com>2021-05-27 09:50:36 -0700
commitc0416698dbaaeba7b706c9eca59e2ba0cab45377 (patch)
tree6c9b232eb3f6f52d7ab91c0f412688021a94b274 /cmds/idmap2/libidmap2/ResourceContainer.cpp
parentbef47a35776cf1d5ae9124b3a3823d1b950d0b80 (diff)
Disable incremental hardening on own resources
When an application is incrementally installed, and a resources operation fails due to the resources not being fully present, the app should crash instead of swallowing the error and returning default values to not alter the experience of using the application. Disable IncFsFileMap protections on ApkAssets that are a part of the application that is running (base and splits). Bug: 187220960 Test: atest ResourcesHardeningTest Change-Id: Ibc67aca688720f983c7c656f404593285a54999b
Diffstat (limited to 'cmds/idmap2/libidmap2/ResourceContainer.cpp')
-rw-r--r--cmds/idmap2/libidmap2/ResourceContainer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmds/idmap2/libidmap2/ResourceContainer.cpp b/cmds/idmap2/libidmap2/ResourceContainer.cpp
index 9147ccaaa17a..c147f6a6024b 100644
--- a/cmds/idmap2/libidmap2/ResourceContainer.cpp
+++ b/cmds/idmap2/libidmap2/ResourceContainer.cpp
@@ -323,7 +323,7 @@ ApkResourceContainer::ApkResourceContainer(std::unique_ptr<ZipAssetsProvider> zi
Result<std::unique_ptr<ApkResourceContainer>> ApkResourceContainer::FromPath(
const std::string& path) {
- auto zip_assets = ZipAssetsProvider::Create(path);
+ auto zip_assets = ZipAssetsProvider::Create(path, 0 /* flags */);
if (zip_assets == nullptr) {
return Error("failed to load zip assets");
}