feat(aa): rename the main profile struct.
This commit is contained in:
parent
4b753210e7
commit
890275fb22
11 changed files with 287 additions and 274 deletions
|
|
@ -197,8 +197,8 @@ func (aaLogs AppArmorLogs) String() string {
|
|||
}
|
||||
|
||||
// ParseToProfiles convert the log data into a new AppArmorProfiles
|
||||
func (aaLogs AppArmorLogs) ParseToProfiles() aa.AppArmorProfiles {
|
||||
profiles := make(aa.AppArmorProfiles, 0)
|
||||
func (aaLogs AppArmorLogs) ParseToProfiles() aa.AppArmorProfileFiles {
|
||||
profiles := make(aa.AppArmorProfileFiles, 0)
|
||||
for _, log := range aaLogs {
|
||||
name := ""
|
||||
if strings.Contains(log["operation"], "dbus") {
|
||||
|
|
@ -208,7 +208,7 @@ func (aaLogs AppArmorLogs) ParseToProfiles() aa.AppArmorProfiles {
|
|||
}
|
||||
|
||||
if _, ok := profiles[name]; !ok {
|
||||
profile := &aa.AppArmorProfile{
|
||||
profile := &aa.AppArmorProfileFile{
|
||||
Profiles: []*aa.Profile{{Header: aa.Header{Name: name}}},
|
||||
}
|
||||
profile.AddRule(log)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue