fix(aa-log): ensure unix logs generate unix rule.
It may break some rule generation on old apparmor version (<3.1). But I don't have the time to support all apparmor version anyway... fix #225
This commit is contained in:
parent
70dc9b7844
commit
13de4182c8
2 changed files with 2 additions and 6 deletions
|
|
@ -92,11 +92,7 @@ func (p *AppArmorProfile) AddRule(log map[string]string) {
|
|||
case "cap":
|
||||
p.Rules = append(p.Rules, CapabilityFromLog(log, noNewPrivs, fileInherit))
|
||||
case "net":
|
||||
if log["family"] == "unix" {
|
||||
p.Rules = append(p.Rules, UnixFromLog(log, noNewPrivs, fileInherit))
|
||||
} else {
|
||||
p.Rules = append(p.Rules, NetworkFromLog(log, noNewPrivs, fileInherit))
|
||||
}
|
||||
p.Rules = append(p.Rules, NetworkFromLog(log, noNewPrivs, fileInherit))
|
||||
case "mount":
|
||||
p.Rules = append(p.Rules, MountFromLog(log, noNewPrivs, fileInherit))
|
||||
case "remount":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue