mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-24 02:25:28 +00:00
Temporarily suppress warnings when applying Magisk rules
This commit is contained in:
parent
2977dbcded
commit
51e9ff59de
@ -28,6 +28,10 @@ static void allowSuClient(const char *target) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void sepol_magisk_rules() {
|
void sepol_magisk_rules() {
|
||||||
|
// Temp suppress warnings
|
||||||
|
auto bak = log_cb.w;
|
||||||
|
log_cb.w = nop_log;
|
||||||
|
|
||||||
// First prevent anything to change sepolicy except ourselves
|
// First prevent anything to change sepolicy except ourselves
|
||||||
sepol_deny(ALL, "kernel", "security", "load_policy");
|
sepol_deny(ALL, "kernel", "security", "load_policy");
|
||||||
|
|
||||||
@ -171,4 +175,6 @@ void sepol_magisk_rules() {
|
|||||||
if (p->key.specified == AVTAB_AUDITDENY || p->key.specified == AVTAB_XPERMS_DONTAUDIT)
|
if (p->key.specified == AVTAB_AUDITDENY || p->key.specified == AVTAB_XPERMS_DONTAUDIT)
|
||||||
avtab_remove_node(&policydb->te_avtab, p);
|
avtab_remove_node(&policydb->te_avtab, p);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
log_cb.w = bak;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user