From: Damien Neil Date: Tue, 18 Feb 2025 17:36:14 +0000 (-0800) Subject: os: document that OpenRoot follows symlinks X-Git-Tag: go1.25rc1~993 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=fcdf444924dcd5dc2fb9e3044e32072460e7c374;p=gostls13.git 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 LUCI-TryBot-Result: Go LUCI Reviewed-by: Ian Lance Taylor --- 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)