Support new sepolicy rules

Support declare new type with attribute and declare new attributes
This commit is contained in:
topjohnwu
2020-05-25 02:09:43 -07:00
parent cd6eca1dc2
commit 4499cebcd9
4 changed files with 155 additions and 90 deletions

View File

@@ -23,7 +23,8 @@ public:
void load_rule_file(c_str file);
// Operation on types
bool create(c_str type);
bool type(c_str name, c_str attr);
bool attribute(c_str name);
bool permissive(c_str type);
bool enforce(c_str type);
bool typeattribute(c_str type, c_str attr);
@@ -51,6 +52,9 @@ public:
// Magisk
void magisk_rules();
// Deprecate
bool create(c_str name) { return type(name, "domain"); }
protected:
policydb *db;
};