feat(aa): continue refractoring the aa structure.

This commit is contained in:
Alexandre Pujol 2024-04-19 22:43:02 +01:00
parent 8ef858ad35
commit c97886d960
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC
22 changed files with 160 additions and 182 deletions

View file

@ -5,7 +5,7 @@
package aa
type File struct {
Rule
RuleBase
Qualifier
Owner bool
Path string
@ -13,7 +13,7 @@ type File struct {
Target string
}
func newFileFromLog(log map[string]string) *File {
func newFileFromLog(log map[string]string) Rule {
owner := false
fsuid, hasFsUID := log["fsuid"]
ouid, hasOuUID := log["ouid"]
@ -22,7 +22,7 @@ func newFileFromLog(log map[string]string) *File {
owner = true
}
return &File{
Rule: newRuleFromLog(log),
RuleBase: newRuleFromLog(log),
Qualifier: newQualifierFromLog(log),
Owner: owner,
Path: log["name"],