]> Cypherpunks repositories - gostls13.git/commit
os: don't follow symlinks on Windows when O_CREATE|O_EXCL and read-only
authorDamien Neil <dneil@google.com>
Tue, 27 May 2025 21:16:17 +0000 (14:16 -0700)
committerGopher Robot <gobot@golang.org>
Wed, 28 May 2025 02:35:07 +0000 (19:35 -0700)
commited08d2ad0928c0fc77cc2053863616ffb58c5aac
treee5ac6cdc943b5b17fa89145bcd200cd0675d25d8
parentfce9d4515defec0473ca3a685408ef5304d23aa9
os: don't follow symlinks on Windows when O_CREATE|O_EXCL and read-only

Fix a bug in CL 672396, where we add FILE_FLAG_OPEN_REPARSE_POINT to
the attributes passed to CreateFile, but then overwrite the attributes
with FILE_ATTRIBUTE_READONLY when opening a file with a read-only
permissions mode.

For #73702

Change-Id: I6c10bf470054592bafa031732585fc3155c61341
Reviewed-on: https://go-review.googlesource.com/c/go/+/676655
Auto-Submit: Damien Neil <dneil@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
src/os/os_test.go
src/syscall/syscall_windows.go