2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-31 06:16:03 +00:00

parser: fix mount for all rule

Without AA_MAY_MOUNT, mount was not allowed by the allow all
rule. AA_DUMMY_REMOUNT does become AA_MAY_MOUNT, but it fixes the
flags to remount only, so other options are not included. Also, add
allow all rule testcases to the mount regression tests.

Fixes: https://gitlab.com/apparmor/apparmor/-/issues/410
Signed-off-by: Georgia Garcia <georgia.garcia@canonical.com>
This commit is contained in:
Georgia Garcia
2024-07-17 14:50:39 -03:00
parent 9b66f6a749
commit d3f5308265
3 changed files with 36 additions and 1 deletions

View File

@@ -67,7 +67,7 @@ void all_rule::add_implied_rules(Profile &prof)
(void) rule->add_prefix(*prefix);
prof.rule_ents.push_back(rule);
rule = new mnt_rule(NULL, NULL, NULL, NULL, 0);
rule = new mnt_rule(NULL, NULL, NULL, NULL, AA_MAY_MOUNT);
(void) rule->add_prefix(*prefix);
prof.rule_ents.push_back(rule);