Vendor in latest containers/common with default capabilities

Also update vendor of containers/storage and image

Cleanup display of added/dropped capabilties as well

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
Daniel J Walsh
2022-12-06 19:49:31 -05:00
parent 1cc22631f6
commit 3718ac8e96
141 changed files with 2344 additions and 1555 deletions

View File

@ -179,14 +179,13 @@ func NewNSWithName(name string) (ns.NetNS, error) {
return ns.GetNS(nsPath)
}
// UnmountNS unmounts the NS held by the netns object
func UnmountNS(netns ns.NetNS) error {
// UnmountNS unmounts the given netns path
func UnmountNS(nsPath string) error {
nsRunDir, err := GetNSRunDir()
if err != nil {
return err
}
nsPath := netns.Path()
// Only unmount if it's been bind-mounted (don't touch namespaces in /proc...)
if strings.HasPrefix(nsPath, nsRunDir) {
if err := unix.Unmount(nsPath, unix.MNT_DETACH); err != nil {