chore(aa): minor cosmetic of the rule interface.

This commit is contained in:
Alexandre Pujol 2024-06-27 18:45:32 +01:00
parent 86b2f74a24
commit 191c72fcb6
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC
20 changed files with 62 additions and 62 deletions

View file

@ -188,7 +188,7 @@ func parseParagraph(input string) (Rules, error) {
res = append(res, rrr...)
for _, r := range res {
if r.Constraint() == preambleKind {
if r.Constraint() == PreambleRule {
return nil, fmt.Errorf("Rule not allowed in block: %s", r)
}
}
@ -588,7 +588,7 @@ func (f *AppArmorProfileFile) parsePreamble(preamble string) error {
f.Preamble = append(f.Preamble, commaRules...)
for _, r := range f.Preamble {
if r.Constraint() == blockKind {
if r.Constraint() == BlockRule {
f.Preamble = nil
return fmt.Errorf("Rule not allowed in preamble: %s", r)
}