-
Notifications
You must be signed in to change notification settings - Fork 3.8k
switch back from golang.org/x/sys/execabs to os/exec (go1.19) #7647
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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