mirror of
https://github.com/kvorschk/Magisk.git
synced 2026-12-06 07:20:47 -05:00
Make sepolicy a shared type between rust and cxx
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#include <base.hpp>
|
||||
|
||||
#include "policy.hpp"
|
||||
#include "include/sepolicy.hpp"
|
||||
|
||||
using namespace std;
|
||||
|
||||
@@ -653,14 +653,14 @@ bool sepol_impl::add_typeattribute(const char *type, const char *attr) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void sepolicy::strip_dontaudit() {
|
||||
void sepolicy::strip_dontaudit() noexcept {
|
||||
avtab_for_each(&impl->db->te_avtab, [=, this](avtab_ptr_t node) {
|
||||
if (node->key.specified == AVTAB_AUDITDENY || node->key.specified == AVTAB_XPERMS_DONTAUDIT)
|
||||
avtab_remove_node(&impl->db->te_avtab, node);
|
||||
});
|
||||
}
|
||||
|
||||
void sepolicy::print_rules() {
|
||||
void sepolicy::print_rules() const noexcept {
|
||||
hashtab_for_each(impl->db->p_types.table, [&](hashtab_ptr_t node) {
|
||||
type_datum_t *type = auto_cast(node->datum);
|
||||
if (type->flavor == TYPE_ATTRIB) {
|
||||
|
||||
Reference in New Issue
Block a user