diff --git a/pkg/aa/base.go b/pkg/aa/base.go index b65e81bb..112f32b3 100644 --- a/pkg/aa/base.go +++ b/pkg/aa/base.go @@ -49,7 +49,7 @@ func newRule(rule []string) RuleBase { } } -func newRuleFromLog(log map[string]string) RuleBase { +func newBaseFromLog(log map[string]string) RuleBase { comment := "" fileInherit, noNewPrivs, optional := false, false, false diff --git a/pkg/aa/capability.go b/pkg/aa/capability.go index 285f473e..7f370c57 100644 --- a/pkg/aa/capability.go +++ b/pkg/aa/capability.go @@ -33,7 +33,7 @@ type Capability struct { func newCapabilityFromLog(log map[string]string) Rule { return &Capability{ - RuleBase: newRuleFromLog(log), + RuleBase: newBaseFromLog(log), Qualifier: newQualifierFromLog(log), Names: Must(toValues(CAPABILITY, "name", log["capname"])), } diff --git a/pkg/aa/change_profile.go b/pkg/aa/change_profile.go index 611fe2ce..06138972 100644 --- a/pkg/aa/change_profile.go +++ b/pkg/aa/change_profile.go @@ -24,7 +24,7 @@ type ChangeProfile struct { func newChangeProfileFromLog(log map[string]string) Rule { return &ChangeProfile{ - RuleBase: newRuleFromLog(log), + RuleBase: newBaseFromLog(log), Qualifier: newQualifierFromLog(log), ExecMode: log["mode"], Exec: log["exec"], diff --git a/pkg/aa/dbus.go b/pkg/aa/dbus.go index afddd3ef..f1f880a1 100644 --- a/pkg/aa/dbus.go +++ b/pkg/aa/dbus.go @@ -42,7 +42,7 @@ func newDbusFromLog(log map[string]string) Rule { peerName = log["name"] } return &Dbus{ - RuleBase: newRuleFromLog(log), + RuleBase: newBaseFromLog(log), Qualifier: newQualifierFromLog(log), Access: []string{log["mask"]}, Bus: log["bus"], diff --git a/pkg/aa/file.go b/pkg/aa/file.go index 66a577fe..a7402574 100644 --- a/pkg/aa/file.go +++ b/pkg/aa/file.go @@ -55,7 +55,7 @@ func newFileFromLog(log map[string]string) Rule { return newLinkFromLog(log) } return &File{ - RuleBase: newRuleFromLog(log), + RuleBase: newBaseFromLog(log), Qualifier: newQualifierFromLog(log), Owner: isOwner(log), Path: log["name"], @@ -114,7 +114,7 @@ type Link struct { func newLinkFromLog(log map[string]string) Rule { return &Link{ - RuleBase: newRuleFromLog(log), + RuleBase: newBaseFromLog(log), Qualifier: newQualifierFromLog(log), Owner: isOwner(log), Path: log["name"], diff --git a/pkg/aa/io_uring.go b/pkg/aa/io_uring.go index 78c3b122..ad18a610 100644 --- a/pkg/aa/io_uring.go +++ b/pkg/aa/io_uring.go @@ -25,7 +25,7 @@ type IOUring struct { func newIOUringFromLog(log map[string]string) Rule { return &IOUring{ - RuleBase: newRuleFromLog(log), + RuleBase: newBaseFromLog(log), Qualifier: newQualifierFromLog(log), Access: Must(toAccess(IOURING, log["requested"])), Label: log["label"], diff --git a/pkg/aa/mount.go b/pkg/aa/mount.go index a81401e3..f2efc143 100644 --- a/pkg/aa/mount.go +++ b/pkg/aa/mount.go @@ -64,7 +64,7 @@ type Mount struct { func newMountFromLog(log map[string]string) Rule { return &Mount{ - RuleBase: newRuleFromLog(log), + RuleBase: newBaseFromLog(log), Qualifier: newQualifierFromLog(log), MountConditions: newMountConditionsFromLog(log), Source: log["srcname"], @@ -114,7 +114,7 @@ type Umount struct { func newUmountFromLog(log map[string]string) Rule { return &Umount{ - RuleBase: newRuleFromLog(log), + RuleBase: newBaseFromLog(log), Qualifier: newQualifierFromLog(log), MountConditions: newMountConditionsFromLog(log), MountPoint: log["name"], @@ -160,7 +160,7 @@ type Remount struct { func newRemountFromLog(log map[string]string) Rule { return &Remount{ - RuleBase: newRuleFromLog(log), + RuleBase: newBaseFromLog(log), Qualifier: newQualifierFromLog(log), MountConditions: newMountConditionsFromLog(log), MountPoint: log["name"], diff --git a/pkg/aa/mqueue.go b/pkg/aa/mqueue.go index 9809039c..2428b904 100644 --- a/pkg/aa/mqueue.go +++ b/pkg/aa/mqueue.go @@ -39,7 +39,7 @@ func newMqueueFromLog(log map[string]string) Rule { mqueueType = "sysv" } return &Mqueue{ - RuleBase: newRuleFromLog(log), + RuleBase: newBaseFromLog(log), Qualifier: newQualifierFromLog(log), Access: Must(toAccess(MQUEUE, log["requested"])), Type: mqueueType, diff --git a/pkg/aa/network.go b/pkg/aa/network.go index 4970bc97..4051ee1f 100644 --- a/pkg/aa/network.go +++ b/pkg/aa/network.go @@ -72,7 +72,7 @@ type Network struct { func newNetworkFromLog(log map[string]string) Rule { return &Network{ - RuleBase: newRuleFromLog(log), + RuleBase: newBaseFromLog(log), Qualifier: newQualifierFromLog(log), AddressExpr: newAddressExprFromLog(log), Domain: log["family"], diff --git a/pkg/aa/pivot_root.go b/pkg/aa/pivot_root.go index 0adeb62c..7ac0b02f 100644 --- a/pkg/aa/pivot_root.go +++ b/pkg/aa/pivot_root.go @@ -16,7 +16,7 @@ type PivotRoot struct { func newPivotRootFromLog(log map[string]string) Rule { return &PivotRoot{ - RuleBase: newRuleFromLog(log), + RuleBase: newBaseFromLog(log), Qualifier: newQualifierFromLog(log), OldRoot: log["srcname"], NewRoot: log["name"], diff --git a/pkg/aa/ptrace.go b/pkg/aa/ptrace.go index 5276d315..7614c69c 100644 --- a/pkg/aa/ptrace.go +++ b/pkg/aa/ptrace.go @@ -27,7 +27,7 @@ type Ptrace struct { func newPtraceFromLog(log map[string]string) Rule { return &Ptrace{ - RuleBase: newRuleFromLog(log), + RuleBase: newBaseFromLog(log), Qualifier: newQualifierFromLog(log), Access: Must(toAccess(PTRACE, log["requested_mask"])), Peer: log["peer"], diff --git a/pkg/aa/rlimit.go b/pkg/aa/rlimit.go index 415f443b..5491446e 100644 --- a/pkg/aa/rlimit.go +++ b/pkg/aa/rlimit.go @@ -29,7 +29,7 @@ type Rlimit struct { func newRlimitFromLog(log map[string]string) Rule { return &Rlimit{ - RuleBase: newRuleFromLog(log), + RuleBase: newBaseFromLog(log), Key: log["key"], Op: log["op"], Value: log["value"], diff --git a/pkg/aa/signal.go b/pkg/aa/signal.go index 53dcc3a5..514fd6b9 100644 --- a/pkg/aa/signal.go +++ b/pkg/aa/signal.go @@ -41,7 +41,7 @@ type Signal struct { func newSignalFromLog(log map[string]string) Rule { return &Signal{ - RuleBase: newRuleFromLog(log), + RuleBase: newBaseFromLog(log), Qualifier: newQualifierFromLog(log), Access: Must(toAccess(SIGNAL, log["requested_mask"])), Set: []string{log["signal"]}, diff --git a/pkg/aa/unix.go b/pkg/aa/unix.go index 41afbad6..23066fda 100644 --- a/pkg/aa/unix.go +++ b/pkg/aa/unix.go @@ -36,7 +36,7 @@ type Unix struct { func newUnixFromLog(log map[string]string) Rule { return &Unix{ - RuleBase: newRuleFromLog(log), + RuleBase: newBaseFromLog(log), Qualifier: newQualifierFromLog(log), Access: Must(toAccess(UNIX, log["requested_mask"])), Type: log["sock_type"], diff --git a/pkg/aa/userns.go b/pkg/aa/userns.go index 8a133855..28bc948c 100644 --- a/pkg/aa/userns.go +++ b/pkg/aa/userns.go @@ -16,7 +16,7 @@ type Userns struct { func newUsernsFromLog(log map[string]string) Rule { return &Userns{ - RuleBase: newRuleFromLog(log), + RuleBase: newBaseFromLog(log), Qualifier: newQualifierFromLog(log), Create: true, }