Skip to content

Commit

Permalink
Update libbeat/common/capabilities/capabilities_linux_test.go
Browse files Browse the repository at this point in the history
Co-authored-by: Dan Kortschak <[email protected]>
  • Loading branch information
haesbaert and efd6 authored Dec 20, 2023
1 parent 17d94fa commit 62ade13
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions libbeat/common/capabilities/capabilities_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,21 @@ func TestOverflow(t *testing.T) {
assert.Nil(t, err)
assert.Equal(t, len(sl), 64)

assertHasCap(t, sl, "CAP_CHOWN")
assertHasCap(t, sl, "CAP_DAC_OVERRIDE")
assertHasCap(t, sl, "CAP_DAC_READ_SEARCH")
assertHasCap(t, sl, "CAP_FOWNER")
assertHasCap(t, sl, "CAP_FSETID")
assertHasCap(t, sl, "CAP_KILL")
assertHasCap(t, sl, "CAP_SETGID")
assertHasCap(t, sl, "CAP_SYS_MODULE")
assertHasCap(t, sl, "CAP_SYS_RAWIO")
assertHasCap(t, sl, "CAP_IPC_LOCK")
assertHasCap(t, sl, "CAP_MAC_OVERRIDE")
for _, cap := range []string{
"CAP_CHOWN",
"CAP_DAC_OVERRIDE",
"CAP_DAC_READ_SEARCH",
"CAP_FOWNER",
"CAP_FSETID",
"CAP_KILL",
"CAP_SETGID",
"CAP_SYS_MODULE",
"CAP_SYS_RAWIO",
"CAP_IPC_LOCK",
"CAP_MAC_OVERRIDE",
} {
assertHasCap(t, sl, cap)
}
if cap.MaxBits() <= 62 {
assertHasCap(t, sl, "CAP_62")
}
Expand Down

0 comments on commit 62ade13

Please sign in to comment.