chore: cosmetic
This commit is contained in:
parent
9812c38b83
commit
865ce4c66b
3 changed files with 14 additions and 14 deletions
|
|
@ -27,6 +27,16 @@ func init() {
|
|||
}
|
||||
}
|
||||
|
||||
func isOwner(log map[string]string) bool {
|
||||
fsuid, hasFsUID := log["fsuid"]
|
||||
ouid, hasOuUID := log["ouid"]
|
||||
isDbus := strings.Contains(log["operation"], "dbus")
|
||||
if hasFsUID && hasOuUID && fsuid == ouid && ouid != "0" && !isDbus {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// cmpFileAccess compares two access strings for file rules.
|
||||
// It is aimed to be used in slices.SortFunc.
|
||||
func cmpFileAccess(i, j string) int {
|
||||
|
|
@ -164,13 +174,3 @@ func (r *Link) Constraint() constraint {
|
|||
func (r *Link) Kind() string {
|
||||
return tokLINK
|
||||
}
|
||||
|
||||
func isOwner(log map[string]string) bool {
|
||||
fsuid, hasFsUID := log["fsuid"]
|
||||
ouid, hasOuUID := log["ouid"]
|
||||
isDbus := strings.Contains(log["operation"], "dbus")
|
||||
if hasFsUID && hasOuUID && fsuid == ouid && ouid != "0" && !isDbus {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue