diff --git a/parser/all_rule.cc b/parser/all_rule.cc index 34159349e..4ebc47a8a 100644 --- a/parser/all_rule.cc +++ b/parser/all_rule.cc @@ -39,7 +39,7 @@ void all_rule::add_implied_rules(Profile &prof) prefix_rule_t *rule; const prefixes *prefix = this; - rule = new unix_rule(0, audit, rule_mode); + rule = new unix_rule(0xffffffff, audit, rule_mode); (void) rule->add_prefix(*prefix); prof.rule_ents.push_back(rule); @@ -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); diff --git a/tests/regression/apparmor/aa_exec.sh b/tests/regression/apparmor/aa_exec.sh index daaefee9b..9ef1f5355 100755 --- a/tests/regression/apparmor/aa_exec.sh +++ b/tests/regression/apparmor/aa_exec.sh @@ -79,3 +79,16 @@ runchecktest "complain (--namespace=${ns})" pass "$aa_exec -n $ns -p $test" "$te genprofile_aa_exec "$test" 0 runchecktest "negative test: bad ns (--namespace=${ns}XXX)" fail "$aa_exec -n ${ns}XXX -p $test" "$test (enforce)" + +if [ "$(parser_supports 'all,')" = "true" ]; then + genprofile --stdin <