<feed xmlns='http://www.w3.org/2005/Atom'>
<title>go/src/internal/execabs/execabs_test.go, branch main</title>
<subtitle>Fork of Go programming language with my patches.</subtitle>
<id>http://git.kilabit.info/go/atom?h=main</id>
<link rel='self' href='http://git.kilabit.info/go/atom?h=main'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/'/>
<updated>2022-05-02T14:54:05Z</updated>
<entry>
<title>os/exec: return error when PATH lookup would use current directory</title>
<updated>2022-05-02T14:54:05Z</updated>
<author>
<name>Russ Cox</name>
<email>rsc@golang.org</email>
</author>
<published>2022-04-30T00:05:26Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=349cc83389f71c459b7820b0deecdf81221ba46c'/>
<id>urn:sha1:349cc83389f71c459b7820b0deecdf81221ba46c</id>
<content type='text'>
CL 381374 was reverted because x/sys/execabs broke.

This CL reapplies CL 381374, but adding a lookPathErr error
field back, for execabs to manipulate with reflect.
That field will just be a bit of scar tissue in this package forever,
to keep old code working with new toolchains.

CL 403256 fixes x/sys/execabs's test to be ready for the change.
Older versions of x/sys/execabs will keep working
(that is, will keep rejecting what they should reject),
but they will return a slightly different error from LookPath
without that CL, and the test fails because of the different
error text.

For #43724.

This reverts commit f2b674756b3b684118e4245627d4ed8c07e518e7.

Change-Id: Iee55f8cd9939e1bd31e5cbdada50681cdc505117
Reviewed-on: https://go-review.googlesource.com/c/go/+/403274
Auto-Submit: Russ Cox &lt;rsc@golang.org&gt;
Run-TryBot: Russ Cox &lt;rsc@golang.org&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
</content>
</entry>
<entry>
<title>Revert "os/exec: return error when PATH lookup would use current directory"</title>
<updated>2022-04-29T23:04:17Z</updated>
<author>
<name>Bryan Mills</name>
<email>bcmills@google.com</email>
</author>
<published>2022-04-29T21:38:40Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=f2b674756b3b684118e4245627d4ed8c07e518e7'/>
<id>urn:sha1:f2b674756b3b684118e4245627d4ed8c07e518e7</id>
<content type='text'>
This reverts CL 381374.

Reason for revert: broke tests for x/sys/execabs.

Updates #43724.
Updates #43947.

Change-Id: I9eb3adb5728dead66dbd20f6afe1e7a77e2a26f1
Reviewed-on: https://go-review.googlesource.com/c/go/+/403058
Reviewed-by: Dmitri Shuralyov &lt;dmitshur@google.com&gt;
Run-TryBot: Dmitri Shuralyov &lt;dmitshur@golang.org&gt;
Reviewed-by: Dmitri Shuralyov &lt;dmitshur@golang.org&gt;
Auto-Submit: Dmitri Shuralyov &lt;dmitshur@golang.org&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Auto-Submit: Bryan Mills &lt;bcmills@google.com&gt;
</content>
</entry>
<entry>
<title>os/exec: return error when PATH lookup would use current directory</title>
<updated>2022-04-29T20:16:31Z</updated>
<author>
<name>Russ Cox</name>
<email>rsc@golang.org</email>
</author>
<published>2022-01-27T17:59:37Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=3ce203db80cd1f320f0c597123b918c3b3bb0449'/>
<id>urn:sha1:3ce203db80cd1f320f0c597123b918c3b3bb0449</id>
<content type='text'>
Following discussion on #43724, change os/exec to take the
approach of golang.org/x/sys/execabs, refusing to respect
path entries mentioning relative paths by default.

Code that insists on being able to find executables in relative
directories in the path will need to add a couple lines to override the error.

See the updated package docs in exec.go for more details.

Fixes #43724.
Fixes #43947.

Change-Id: I73c1214f322b60b4167a23e956e933d50470fe13
Reviewed-on: https://go-review.googlesource.com/c/go/+/381374
Reviewed-by: Bryan Mills &lt;bcmills@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Run-TryBot: Bryan Mills &lt;bcmills@google.com&gt;
</content>
</entry>
<entry>
<title>internal/execabs: replace ioutil.WriteFile with os.WriteFile</title>
<updated>2021-04-12T21:57:23Z</updated>
<author>
<name>Manlio Perillo</name>
<email>manlio.perillo@gmail.com</email>
</author>
<published>2021-04-12T19:46:14Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=cccd3ba912ae903498e7fdc60fb47f5cb64c3570'/>
<id>urn:sha1:cccd3ba912ae903498e7fdc60fb47f5cb64c3570</id>
<content type='text'>
Fixes #45532.

Change-Id: I844acd50d6fa1ce918969bbb52f79dd7412d289f
Reviewed-on: https://go-review.googlesource.com/c/go/+/309350
Run-TryBot: Ian Lance Taylor &lt;iant@golang.org&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
Trust: Tobias Klauser &lt;tobias.klauser@gmail.com&gt;
</content>
</entry>
<entry>
<title>all: update references to symbols moved from io/ioutil to io</title>
<updated>2021-04-05T17:51:15Z</updated>
<author>
<name>KimMachineGun</name>
<email>geon0250@gmail.com</email>
</author>
<published>2021-04-03T08:10:47Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=a040ebeb980d1a712509fa3d8073cf6ae16cbe78'/>
<id>urn:sha1:a040ebeb980d1a712509fa3d8073cf6ae16cbe78</id>
<content type='text'>
Update references missed in CL 263142.

For #41190

Change-Id: I778760a6a69bd0440fec0848bdef539c9ccb4ee1
GitHub-Last-Rev: dda42b09fff36dc08ec1cdec50cc19e3da5058e5
GitHub-Pull-Request: golang/go#42874
Reviewed-on: https://go-review.googlesource.com/c/go/+/273946
Run-TryBot: Ian Lance Taylor &lt;iant@golang.org&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
Trust: Cherry Zhang &lt;cherryyz@google.com&gt;
</content>
</entry>
<entry>
<title>all: introduce and use internal/execabs</title>
<updated>2021-01-21T19:10:18Z</updated>
<author>
<name>Roland Shoemaker</name>
<email>roland@golang.org</email>
</author>
<published>2021-01-15T20:14:06Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=953d1feca9b21af075ad5fc8a3dad096d3ccc3a0'/>
<id>urn:sha1:953d1feca9b21af075ad5fc8a3dad096d3ccc3a0</id>
<content type='text'>
Introduces a wrapper around os/exec, internal/execabs, for use in
all commands. This wrapper prevents exec.LookPath and exec.Command from
running executables in the current directory.

All imports of os/exec in non-test files in cmd/ are replaced with
imports of internal/execabs.

This issue was reported by RyotaK.

Fixes CVE-2021-3115
Fixes #43783

Change-Id: I0423451a6e27ec1e1d6f3fe929ab1ef69145c08f
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/955304
Reviewed-by: Russ Cox &lt;rsc@google.com&gt;
Reviewed-by: Katie Hockman &lt;katiehockman@google.com&gt;
Reviewed-on: https://go-review.googlesource.com/c/go/+/284783
Run-TryBot: Roland Shoemaker &lt;roland@golang.org&gt;
Reviewed-by: Katie Hockman &lt;katie@golang.org&gt;
Trust: Roland Shoemaker &lt;roland@golang.org&gt;
</content>
</entry>
</feed>
