aboutsummaryrefslogtreecommitdiff
path: root/src/os/root.go
diff options
context:
space:
mode:
authorDamien Neil <dneil@google.com>2025-02-18 09:36:14 -0800
committerGopher Robot <gobot@golang.org>2025-02-18 10:00:13 -0800
commitfcdf444924dcd5dc2fb9e3044e32072460e7c374 (patch)
tree14a461ab02080c6fbb9008fac685c265b5ce6f74 /src/os/root.go
parentad8b33002bb5cb0c910694339e1cc6c75f781c5a (diff)
downloadgo-fcdf444924dcd5dc2fb9e3044e32072460e7c374.tar.xz
os: document that OpenRoot follows symlinks
OpenRoot is expected to be called with a trusted path, and does not attempt to defend against symlinks in that path. Fixes #71806 Change-Id: Ib8b2e123e323d22d5c23ed9f711d21995139a7ef Reviewed-on: https://go-review.googlesource.com/c/go/+/650355 Auto-Submit: Damien Neil <dneil@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
Diffstat (limited to 'src/os/root.go')
-rw-r--r--src/os/root.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/os/root.go b/src/os/root.go
index fd3b603ed8..a7e667b3c8 100644
--- a/src/os/root.go
+++ b/src/os/root.go
@@ -76,6 +76,7 @@ const (
)
// OpenRoot opens the named directory.
+// It follows symbolic links in the directory name.
// If there is an error, it will be of type *PathError.
func OpenRoot(name string) (*Root, error) {
testlog.Open(name)