feat(aa-log): add less & equals rule methods.
This commit is contained in:
parent
923bb66eba
commit
e23e10d7b7
17 changed files with 394 additions and 86 deletions
|
|
@ -16,3 +16,15 @@ func UsernsFromLog(log map[string]string, noNewPrivs, fileInherit bool) Apparmor
|
|||
}
|
||||
}
|
||||
|
||||
func (r *Userns) Less(other any) bool {
|
||||
o, _ := other.(*Userns)
|
||||
if r.Qualifier.Equals(o.Qualifier) {
|
||||
return r.Create
|
||||
}
|
||||
return r.Qualifier.Less(o.Qualifier)
|
||||
}
|
||||
|
||||
func (r *Userns) Equals(other any) bool {
|
||||
o, _ := other.(*Userns)
|
||||
return r.Create == o.Create && r.Qualifier.Equals(o.Qualifier)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue