mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-31 06:16:03 +00:00
parser: make base classes for rules using prefixes and perms and use them
Cleanup the parse code by making shared prefix and perms classes for rules and convert rules to use them. Signed-off-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
@@ -46,6 +46,13 @@ public:
|
||||
free(peer_addr);
|
||||
};
|
||||
|
||||
virtual bool valid_prefix(prefixes &p, const char *&error) {
|
||||
if (p.owner) {
|
||||
error = "owner prefix not allowed on unix rules";
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
virtual bool has_peer_conds(void) {
|
||||
return af_rule::has_peer_conds() || peer_addr;
|
||||
}
|
||||
|
Reference in New Issue
Block a user