Remove all dontaudit in magisk rules

This commit is contained in:
topjohnwu
2018-11-29 06:28:37 -05:00
parent ac60b51035
commit 2977dbcded
3 changed files with 18 additions and 2 deletions

View File

@@ -165,4 +165,10 @@ void sepol_magisk_rules() {
// Allow update engine to source addon.d.sh
sepol_allow("update_engine", "adb_data_file", "dir", ALL);
// Remove all dontaudit
for_each_avtab_node([](auto p) -> void {
if (p->key.specified == AVTAB_AUDITDENY || p->key.specified == AVTAB_XPERMS_DONTAUDIT)
avtab_remove_node(&policydb->te_avtab, p);
});
}