Skip to content

Commit 989d4e4

Browse files
authored
Merge pull request #4480 from austinvazquez/cherry-pick-eb2ff52ace1775ad667ca900b2e57e7d698e3484-to-1.2
[1.2] libct: rm x/sys/execabs usage
2 parents 0e4ee02 + f479676 commit 989d4e4

File tree

5 files changed

+2
-143
lines changed

5 files changed

+2
-143
lines changed

libcontainer/container_linux.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import (
1919
"github.com/opencontainers/runtime-spec/specs-go"
2020
"github.com/sirupsen/logrus"
2121
"github.com/vishvananda/netlink/nl"
22-
"golang.org/x/sys/execabs"
2322
"golang.org/x/sys/unix"
2423

2524
"github.com/opencontainers/runc/libcontainer/cgroups"
@@ -1127,7 +1126,7 @@ func (c *Container) bootstrapData(cloneFlags uintptr, nsMaps map[configs.Namespa
11271126
// We resolve the paths for new{u,g}idmap from
11281127
// the context of runc to avoid doing a path
11291128
// lookup in the nsexec context.
1130-
if path, err := execabs.LookPath("newuidmap"); err == nil {
1129+
if path, err := exec.LookPath("newuidmap"); err == nil {
11311130
r.AddData(&Bytemsg{
11321131
Type: UidmapPathAttr,
11331132
Value: []byte(path),
@@ -1155,7 +1154,7 @@ func (c *Container) bootstrapData(cloneFlags uintptr, nsMaps map[configs.Namespa
11551154
Value: b,
11561155
})
11571156
if c.config.RootlessEUID {
1158-
if path, err := execabs.LookPath("newgidmap"); err == nil {
1157+
if path, err := exec.LookPath("newgidmap"); err == nil {
11591158
r.AddData(&Bytemsg{
11601159
Type: GidmapPathAttr,
11611160
Value: []byte(path),

vendor/golang.org/x/sys/execabs/execabs.go

Lines changed: 0 additions & 102 deletions
This file was deleted.

vendor/golang.org/x/sys/execabs/execabs_go118.go

Lines changed: 0 additions & 17 deletions
This file was deleted.

vendor/golang.org/x/sys/execabs/execabs_go119.go

Lines changed: 0 additions & 20 deletions
This file was deleted.

vendor/modules.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ golang.org/x/exp/constraints
8686
golang.org/x/net/bpf
8787
# golang.org/x/sys v0.22.0
8888
## explicit; go 1.18
89-
golang.org/x/sys/execabs
9089
golang.org/x/sys/unix
9190
golang.org/x/sys/windows
9291
# google.golang.org/protobuf v1.33.0

0 commit comments

Comments
 (0)