diff --git a/src/runtime/go.mod b/src/runtime/go.mod index 37dba16cd9..1134563236 100644 --- a/src/runtime/go.mod +++ b/src/runtime/go.mod @@ -35,6 +35,7 @@ require ( github.com/hashicorp/go-multierror v1.1.1 github.com/intel-go/cpuid v0.0.0-20210602155658-5747e5cec0d9 github.com/mdlayher/vsock v1.2.1 + github.com/moby/sys/userns v0.1.0 github.com/opencontainers/runc v1.2.0 github.com/opencontainers/runtime-spec v1.2.0 github.com/opencontainers/selinux v1.11.0 @@ -111,7 +112,6 @@ require ( github.com/moby/sys/signal v0.7.0 // indirect github.com/moby/sys/symlink v0.2.0 // indirect github.com/moby/sys/user v0.3.0 // indirect - github.com/moby/sys/userns v0.1.0 // indirect github.com/oklog/ulid v1.3.1 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.0 // indirect diff --git a/src/runtime/vendor/github.com/opencontainers/runc/libcontainer/userns/userns_deprecated.go b/src/runtime/vendor/github.com/opencontainers/runc/libcontainer/userns/userns_deprecated.go deleted file mode 100644 index 31107f8729..0000000000 --- a/src/runtime/vendor/github.com/opencontainers/runc/libcontainer/userns/userns_deprecated.go +++ /dev/null @@ -1,13 +0,0 @@ -// Deprecated: use github.com/moby/sys/userns -package userns - -import "github.com/moby/sys/userns" - -// RunningInUserNS detects whether we are currently running in a Linux -// user namespace and memoizes the result. It returns false on non-Linux -// platforms. -// -// Deprecated: use [userns.RunningInUserNS]. -func RunningInUserNS() bool { - return userns.RunningInUserNS() -} diff --git a/src/runtime/vendor/modules.txt b/src/runtime/vendor/modules.txt index 8cda5386af..0237c846c2 100644 --- a/src/runtime/vendor/modules.txt +++ b/src/runtime/vendor/modules.txt @@ -438,7 +438,6 @@ github.com/opencontainers/runc/libcontainer/cgroups/fscommon github.com/opencontainers/runc/libcontainer/cgroups/systemd github.com/opencontainers/runc/libcontainer/configs github.com/opencontainers/runc/libcontainer/devices -github.com/opencontainers/runc/libcontainer/userns github.com/opencontainers/runc/libcontainer/utils # github.com/opencontainers/runtime-spec v1.2.0 ## explicit diff --git a/src/runtime/virtcontainers/pkg/rootless/rootless.go b/src/runtime/virtcontainers/pkg/rootless/rootless.go index fd17ccb326..f3152c02a9 100644 --- a/src/runtime/virtcontainers/pkg/rootless/rootless.go +++ b/src/runtime/virtcontainers/pkg/rootless/rootless.go @@ -24,7 +24,7 @@ import ( "os" "sync" - "github.com/opencontainers/runc/libcontainer/userns" + "github.com/moby/sys/userns" "github.com/sirupsen/logrus" ) diff --git a/src/runtime/virtcontainers/pkg/rootless/rootless_test.go b/src/runtime/virtcontainers/pkg/rootless/rootless_test.go index 2a7f434462..92c18fcd63 100644 --- a/src/runtime/virtcontainers/pkg/rootless/rootless_test.go +++ b/src/runtime/virtcontainers/pkg/rootless/rootless_test.go @@ -9,7 +9,7 @@ import ( "os" "testing" - "github.com/opencontainers/runc/libcontainer/userns" + "github.com/moby/sys/userns" "github.com/stretchr/testify/assert" )