Skip to content

Commit d6f0c29

Browse files
authored
Merge pull request #3779 from AkihiroSuda/disable-mknod00-in-userns-1.3
[release/1.3] apply: use naive applier when running in UserNS
2 parents 7af311b + f3c48da commit d6f0c29

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

diff/apply/apply_linux.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,18 @@ import (
2626
"github.com/containerd/containerd/archive"
2727
"github.com/containerd/containerd/errdefs"
2828
"github.com/containerd/containerd/mount"
29+
"github.com/opencontainers/runc/libcontainer/system"
2930
"github.com/pkg/errors"
3031
)
3132

3233
func apply(ctx context.Context, mounts []mount.Mount, r io.Reader) error {
3334
switch {
3435
case len(mounts) == 1 && mounts[0].Type == "overlay":
36+
// OverlayConvertWhiteout (mknod c 0 0) doesn't work in userns.
37+
// https://github.com/containerd/containerd/issues/3762
38+
if system.RunningInUserNS() {
39+
break
40+
}
3541
path, parents, err := getOverlayPath(mounts[0].Options)
3642
if err != nil {
3743
if errdefs.IsInvalidArgument(err) {

0 commit comments

Comments
 (0)