summaryrefslogtreecommitdiff
path: root/cmds/idmap2/tests/FileUtilsTests.cpp
Commit message (Collapse)AuthorAgeFilesLines
* idmap2: remove the 'scan' commandMårten Kongstad2020-07-201-57/+0
| | | | | | | | | | | The 'scan' command has been replaced by 'create-multiple'. Remove the unused code. Also remove unused functions and #includes from FileUtils, and the obsolete JNI plumbing. Test: atest idmap2_tests OverlayDeviceTests OverlayHostTests Change-Id: Iae073c13ce64b5db48f22f7e723bc8c0c5fcd2c9
* Fix resourcesMap to work with shared librariesRyan Mitchell2020-02-061-2/+2
| | | | | | | | | | android:resourcesMap is not working at all with shared libraries. This change fixes that so overlays built as shared libraries can use the attribute. Bug: None Test: idmap2_tests Change-Id: I767481f88c58892a3818a919616056291b09b57e
* Fix android-cloexec-pipe clang-tidy warningYi Kong2019-08-151-1/+2
| | | | | | | | | | | | | | | | The upcoming clang-tidy update finds a new instance of android-cloexec-pipe warning: FileUtilsTests.cpp:72:13: error: prefer pipe2() with O_CLOEXEC to avoid leaking file descriptors to child processes ASSERT_EQ(pipe(pipefd), 0); ^~~~~~~~~~~~ pipe2(pipefd, O_CLOEXEC) Apply the suggested fix by clang-tidy. Test: build Bug: 131328001 Change-Id: Iee772b5c3ed5e2af481e479dab19030f8419290a
* Run idmap2 static-checks and fix formatting issuesRyan Mitchell2019-04-151-7/+5
| | | | | | Bug: 130324774 Test: builds Change-Id: I2cf9d3aa268ffe38e525fadee9d81fc6aefe19b1
* idmap2: switch to improved Result classMårten Kongstad2019-02-271-15/+9
| | | | | | | | Remove the old std::optional based Result class, replace uses with the new std::variant based Result class. Test: make idmap2_tests Change-Id: I401cb36e5af06133a2872d835cf29bfb0b106597
* idmap2: add signature policyWinson2019-02-151-7/+15
| | | | | | | | | | Handles the new signature policy for overlayable resources. Bug: 119402606 Test: idmap2_tests target Change-Id: I7961e04a879c40c240ed9097bb510addb8b56680
* Enforce overlayable API when definedRyan Mitchell2019-02-051-10/+17
| | | | | | | | | If a package defines overlayable resources, then do not allow resources that are not defined as overlayable to be overlaid. Bug:123600120 Test: idmap2_tests and cts-tradefed run cts -m CtsRROTestCases Change-Id: I35120a97ccf4650e67c7ba65a60f4f3c51b0e627
* idmap2: lock down write access to /data/resouce-cacheMårten Kongstad2019-01-181-0/+23
| | | | | | | | | | Deny write access to /data/resource-cache for UIDs other than root and system. While this is already handled by SELinux rules, add an additional layer of security to explicitly prevent malicious apps from messing with the system's idmap files. Test: make idmap2_tests Change-Id: Id986633558d5d02452276f05f64337a8700f148a
* Add enforcement of idmap policiesMårten Kongstad2019-01-161-6/+8
| | | | | | | | | | | | | | Teaches idmap2 to recognize policy restrictions put on overlayable resources. If overlayable enforcement is turned on for an overlay, then any resources defined within the overlayable api of the target will have policy restrictions imposed on them. All resources without overlayable definitions will continue to be overlayable without policy restrictions. Bug: 119390857 Test: atest idmap2 and booting Co-authored-by: Ryan Mitchell <rtmitchell@google.com> Change-Id: I7e435648eb6e4a87b0b90a7b2a0c3f33c1516ea6
* idmap2: fix clang-tidy warnings [modernize-*]Mårten Kongstad2018-12-211-6/+2
| | | | | | Bug: 120024673 Test: mmm frameworks/base/cmds/idmap2; check output Change-Id: I8768169fb7b541eb6b1aa3311c46a710eb71aac9
* idmap2: fix clang-tidy warnings [readability-*]Mårten Kongstad2018-12-201-3/+3
| | | | | | Bug: 120024673 Test: mmm frameworks/base/cmds/idmap2; check output Change-Id: I1565afac8d34e4347d8c946228d1134211e8b435
* idmap2: initial code dropMårten Kongstad2018-10-301-0/+76
idmap2 is a reboot of the idmap project. The project aims to - use modern C++ - greatly improve test and debug support - interface towards AssetManager2 (instead of AssetManager) - provide a solid foundation to add support for new features To make it easier to verify correctness, this first version of idmap2 is feature equivalent to idmap. Later versions will add support for new features such as <overlayable>. Bug: 78815803 Test: make idmap2_tests Change-Id: I1d806dc875a493e730ab55d2fdb027618e586d16