Update 'images' to v0.113.0
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
This commit is contained in:
parent
b8c2e4c45c
commit
8514c95837
646 changed files with 36206 additions and 22388 deletions
14
vendor/github.com/containers/storage/pkg/idmap/idmapped_utils.go
generated
vendored
14
vendor/github.com/containers/storage/pkg/idmap/idmapped_utils.go
generated
vendored
|
|
@ -1,10 +1,11 @@
|
|||
//go:build linux
|
||||
// +build linux
|
||||
|
||||
package idmap
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/fs"
|
||||
"os"
|
||||
"runtime"
|
||||
"syscall"
|
||||
|
|
@ -26,7 +27,7 @@ func CreateIDMappedMount(source, target string, pid int) error {
|
|||
|
||||
targetDirFd, err := unix.OpenTree(0, source, unix.OPEN_TREE_CLONE)
|
||||
if err != nil {
|
||||
return err
|
||||
return &os.PathError{Op: "open_tree", Path: source, Err: err}
|
||||
}
|
||||
defer unix.Close(targetDirFd)
|
||||
|
||||
|
|
@ -35,13 +36,16 @@ func CreateIDMappedMount(source, target string, pid int) error {
|
|||
Attr_set: unix.MOUNT_ATTR_IDMAP,
|
||||
Userns_fd: uint64(userNsFile.Fd()),
|
||||
}); err != nil {
|
||||
return err
|
||||
return &os.PathError{Op: "mount_setattr", Path: source, Err: err}
|
||||
}
|
||||
if err := os.Mkdir(target, 0o700); err != nil && !os.IsExist(err) {
|
||||
if err := os.Mkdir(target, 0o700); err != nil && !errors.Is(err, fs.ErrExist) {
|
||||
return err
|
||||
}
|
||||
|
||||
return unix.MoveMount(targetDirFd, "", 0, target, unix.MOVE_MOUNT_F_EMPTY_PATH)
|
||||
if err := unix.MoveMount(targetDirFd, "", 0, target, unix.MOVE_MOUNT_F_EMPTY_PATH); err != nil {
|
||||
return &os.PathError{Op: "move_mount", Path: target, Err: err}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// CreateUsernsProcess forks the current process and creates a user namespace using the specified
|
||||
|
|
|
|||
1
vendor/github.com/containers/storage/pkg/idmap/idmapped_utils_unsupported.go
generated
vendored
1
vendor/github.com/containers/storage/pkg/idmap/idmapped_utils_unsupported.go
generated
vendored
|
|
@ -1,5 +1,4 @@
|
|||
//go:build !linux
|
||||
// +build !linux
|
||||
|
||||
package idmap
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue