switch back from golang.org/x/sys/execabs to os/exec (go1.19)#7647
switch back from golang.org/x/sys/execabs to os/exec (go1.19)#7647AkihiroSuda merged 1 commit intocontainerd:mainfrom
Conversation
|
Distros may package containerd 1.7 with Go 1.18, so probably this should be postponed to v2.0 |
47c1419 to
d27b180
Compare
|
@thaJeztah I was reviewing #8789 when I noticed the import for one of the execs was execabs, and then wound up down the same rabbit hole as you 🤣. I think we can swap now given we're on the road to 2.0 |
|
Oh! Saw your comment, and then forgot about it; I just rebased this one. Looks like the only consumer of that package is now |
This comment was marked as resolved.
This comment was marked as resolved.
|
Rebased, and also opened a pull request in golang.org/x/tools; |
|
Rebased after #9316 was merged (which caused one minor conflict in @AkihiroSuda @dcantah this one good to go? |
|
oh! needs a rebase again; let me do so |
This is effectively a revert of 2ac9968, which switched from os/exec to the golang.org/x/sys/execabs package to mitigate security issues (mainly on Windows) with lookups resolving to binaries in the current directory. from the go1.19 release notes https://go.dev/doc/go1.19#os-exec-path > ## PATH lookups > > Command and LookPath no longer allow results from a PATH search to be found > relative to the current directory. This removes a common source of security > problems but may also break existing programs that depend on using, say, > exec.Command("prog") to run a binary named prog (or, on Windows, prog.exe) in > the current directory. See the os/exec package documentation for information > about how best to update such programs. > > On Windows, Command and LookPath now respect the NoDefaultCurrentDirectoryInExePath > environment variable, making it possible to disable the default implicit search > of “.” in PATH lookups on Windows systems. Signed-off-by: Sebastiaan van Stijn <[email protected]>
|
done; should be good again 👍 |
Update fork-external main with upstream main @ 452ec25 Related work items: containerd#5890, containerd#7647, containerd#9218, containerd#9233, containerd#9258, containerd#9270, containerd#9274, containerd#9279, containerd#9283, containerd#9286, containerd#9289, containerd#9290, containerd#9294, containerd#9295, containerd#9297, containerd#9305, containerd#9306, containerd#9308, containerd#9316, containerd#9317, containerd#9319, containerd#9320, containerd#9321
This is effectively a revert of 2ac9968 (#5906), which switched from os/exec to the golang.org/x/sys/execabs package to mitigate security issues (mainly on Windows) with lookups resolving to binaries in the current directory.
from the go1.19 release notes https://go.dev/doc/go1.19#os-exec-path