diff --git a/src/runtime/virtcontainers/pkg/rootless/rootless.go b/src/runtime/virtcontainers/pkg/rootless/rootless.go index 507549fa2a..dc69f43eb0 100644 --- a/src/runtime/virtcontainers/pkg/rootless/rootless.go +++ b/src/runtime/virtcontainers/pkg/rootless/rootless.go @@ -30,7 +30,7 @@ import ( "sync" "github.com/containernetworking/plugins/pkg/ns" - "github.com/opencontainers/runc/libcontainer/system" + "github.com/opencontainers/runc/libcontainer/userns" "github.com/sirupsen/logrus" "golang.org/x/sys/unix" ) @@ -78,7 +78,7 @@ func isRootlessFunc() bool { if os.Geteuid() != 0 { return true } - if system.RunningInUserNS() { + if userns.RunningInUserNS() { return true } SetRootless(false) diff --git a/src/runtime/virtcontainers/pkg/rootless/rootless_test.go b/src/runtime/virtcontainers/pkg/rootless/rootless_test.go index 0933f645a8..2a7f434462 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/system" + "github.com/opencontainers/runc/libcontainer/userns" "github.com/stretchr/testify/assert" ) @@ -21,7 +21,7 @@ func TestIsRootless(t *testing.T) { if os.Getuid() != 0 { rootless = true } else { - rootless = system.RunningInUserNS() + rootless = userns.RunningInUserNS() } assert.Equal(rootless, isRootlessFunc())