mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
libct/cap: no need to load capabilities
We are not really interested in the capabilities of the current process, so there is no need to load those. This results in some performance improvement since now the capability package don't have to parse /proc/self/status. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
@@ -65,9 +65,6 @@ func New(capConfig *configs.Capabilities) (*Caps, error) {
|
||||
if c.pid, err = capability.NewPid2(0); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err = c.pid.Load(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if len(unknownCaps) > 0 {
|
||||
logrus.Warn("ignoring unknown or unavailable capabilities: ", mapKeys(unknownCaps))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user