]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.15-security] cmd/go: overwrite program name with full path
authorRoland Shoemaker <roland@golang.org>
Tue, 19 Jan 2021 17:59:24 +0000 (09:59 -0800)
committerRoland Shoemaker <bracewell@google.com>
Tue, 19 Jan 2021 18:35:07 +0000 (18:35 +0000)
commit14936d407aba84b76ec77b14f4697b31f0ac05aa
tree88910bb0f8e2496049ee1f6b9cd31e6139e66cb1
parent07e3195293ec510171d7d43ec8ac2bcb9cf00df4
[release-branch.go1.15-security] cmd/go: overwrite program name with full path

If the program path is resolved, replace the first argument of the
exec.Cmd, which is the bare program name with the resolved path.

Change-Id: I92cf5e6f4bb7c8fef9b59f5eab963f4e75b90d07
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/957908
Reviewed-by: Katie Hockman <katiehockman@google.com>
Reviewed-by: Russ Cox <rsc@google.com>
Reviewed-by: Jay Conrod <jayconrod@google.com>
(cherry picked from commit a863cb56b33a24aad88f23f1d48629dc4b4b9539)
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/958254
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
src/cmd/go/internal/work/exec.go