summaryrefslogtreecommitdiff
path: root/server/StrictControllerTest.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Strict-related commands portingLuke Huang2018-08-011-4/+4
| | | | | | | Test: built, flashed, booted system/netd/tests/runtests.sh passes Change-Id: Ibff8b050915c65e44cd37bb835943b8582fc003a
* Don't trip up when deleting strict iptables rules.Lorenzo Colitti2017-10-041-4/+9
| | | | | | | | | | | | | | | | | | | | | | Currently, when applying a cleartext policy to a UID, StrictController will attempt to delete all possible policies that might previously have applied to this UID. Because only two of these rules can exist at any given time, at least one of these deletes is guaranteed to fail, causing the whole operation to fail. Instead of adding a log or reject rule for every UID, add a rule that sends that UID to its own chain which then contains the log or reject rule. That way, deleting the previous policy only requires deleting the chain, which is something we know exists. (cherry picked from commit 81e02f21424ebda9a314c7b9fbc31cfe2a99444f) Bug: 64988066 Test: netd_{unit,integration}_test pass Test: android.os.cts.StrictModeTest passes Change-Id: Ic9d66220a65f2ce9510c4194e7b874d3d5dca5d7
* Move the last StrictController command to iptables-restoreLorenzo Colitti2017-07-181-12/+21
| | | | | | Bug: 28362720 Test: unit tests pass Change-Id: I8a4d2b8ea66799c6c3205b00f04ee1999fc7c68b
* Add a test for setUidCleartextPolicy.Lorenzo Colitti2017-07-181-0/+28
| | | | | | Bug: 28362720 Test: netd_{unit,integration}_test pass Change-Id: Ie4577b29230282e0e6c9ae0ae6727af78e8b0849
* Delete all EOTs in iptables commands and remove fixCommandString.Lorenzo Colitti2017-02-101-4/+4
| | | | | | | Test: bullead builds and boots with no iptables errors Test: netd_{unit,integration}_test pass Bug: 32323979 Change-Id: I33ad04ee8f0562bcd4e14046352c934cd2039a5d
* Use iptables-restore in StrictController startup.Lorenzo Colitti2016-03-301-56/+77
| | | | | Bug: 21725996 Change-Id: I2c049a934189f3c87ee15f052abc07d35814f0c9
* Add a test for StrictController.Lorenzo Colitti2016-03-301-0/+103
Bug: 21725996 Bug: 25691379 Change-Id: I24b838161eaf98dede2ae897157ba42414fc926f