From 508c8bdb5d8d5a1e87b9abb2931fafeff8e84412 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Fri, 5 Jan 2024 09:56:22 +0100 Subject: [PATCH] remove remaining uses of golang.org/x/sys/execabs Signed-off-by: Sebastiaan van Stijn --- cmd/containerd-shim/main_unix.go | 2 +- runtime/v1/shim/client/client.go | 2 +- runtime/v1/shim/client/client_linux.go | 2 +- runtime/v1/shim/client/client_unix.go | 3 +-- runtime/v2/runc/v1/service.go | 2 +- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/cmd/containerd-shim/main_unix.go b/cmd/containerd-shim/main_unix.go index 94a9f0ca4c1b9..ca24ce039dad0 100644 --- a/cmd/containerd-shim/main_unix.go +++ b/cmd/containerd-shim/main_unix.go @@ -27,6 +27,7 @@ import ( "io" "net" "os" + "os/exec" "os/signal" "runtime" "runtime/debug" @@ -48,7 +49,6 @@ import ( "github.com/containerd/containerd/version" "github.com/containerd/ttrpc" "github.com/sirupsen/logrus" - exec "golang.org/x/sys/execabs" "golang.org/x/sys/unix" ) diff --git a/runtime/v1/shim/client/client.go b/runtime/v1/shim/client/client.go index 8b626833720f6..c1668182bfb8c 100644 --- a/runtime/v1/shim/client/client.go +++ b/runtime/v1/shim/client/client.go @@ -25,6 +25,7 @@ import ( "io" "net" "os" + "os/exec" "path/filepath" "strconv" "strings" @@ -40,7 +41,6 @@ import ( shimapi "github.com/containerd/containerd/runtime/v1/shim/v1" "github.com/containerd/containerd/sys" "github.com/containerd/ttrpc" - exec "golang.org/x/sys/execabs" "golang.org/x/sys/unix" ) diff --git a/runtime/v1/shim/client/client_linux.go b/runtime/v1/shim/client/client_linux.go index 21353ce241dc0..538c9ded1fae7 100644 --- a/runtime/v1/shim/client/client_linux.go +++ b/runtime/v1/shim/client/client_linux.go @@ -18,10 +18,10 @@ package client import ( "fmt" + "os/exec" "syscall" "github.com/containerd/cgroups/v3/cgroup1" - exec "golang.org/x/sys/execabs" ) func getSysProcAttr() *syscall.SysProcAttr { diff --git a/runtime/v1/shim/client/client_unix.go b/runtime/v1/shim/client/client_unix.go index 2533f7138e4e3..40b6d079452a0 100644 --- a/runtime/v1/shim/client/client_unix.go +++ b/runtime/v1/shim/client/client_unix.go @@ -19,9 +19,8 @@ package client import ( + "os/exec" "syscall" - - exec "golang.org/x/sys/execabs" ) func getSysProcAttr() *syscall.SysProcAttr { diff --git a/runtime/v2/runc/v1/service.go b/runtime/v2/runc/v1/service.go index 79905aaac54dc..26c68fe262c22 100644 --- a/runtime/v2/runc/v1/service.go +++ b/runtime/v2/runc/v1/service.go @@ -23,6 +23,7 @@ import ( "fmt" "io" "os" + "os/exec" "path/filepath" goruntime "runtime" "sync" @@ -51,7 +52,6 @@ import ( runcC "github.com/containerd/go-runc" "github.com/containerd/typeurl/v2" "github.com/sirupsen/logrus" - exec "golang.org/x/sys/execabs" "golang.org/x/sys/unix" )