mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
libct/int: don't hardcode CAP_NET_ADMIN
... use the one from unix instead. Coincidentally, this fixes this warning from gosimple linter: > libcontainer/integration/exec_test.go:448:2: S1021: should merge variable declaration with assignment on next line (gosimple) > var netAdminBit uint > ^ Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
@@ -444,10 +444,7 @@ func TestProcessCaps(t *testing.T) {
|
||||
t.Fatal("Could not parse effective caps", err)
|
||||
}
|
||||
|
||||
var netAdminMask uint64
|
||||
var netAdminBit uint
|
||||
netAdminBit = 12 // from capability.h
|
||||
netAdminMask = 1 << netAdminBit
|
||||
const netAdminMask = 1 << unix.CAP_NET_ADMIN
|
||||
if effectiveCaps&netAdminMask != netAdminMask {
|
||||
t.Fatal("CAP_NET_ADMIN is not set as expected")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user