Skip to content

Commit fcdf444

Browse files
neildgopherbot
authored andcommitted
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 <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
1 parent ad8b330 commit fcdf444

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/os/root.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ const (
7676
)
7777

7878
// OpenRoot opens the named directory.
79+
// It follows symbolic links in the directory name.
7980
// If there is an error, it will be of type *PathError.
8081
func OpenRoot(name string) (*Root, error) {
8182
testlog.Open(name)

0 commit comments

Comments
 (0)