]> Cypherpunks repositories - gostls13.git/commit
internal/syscall/windows: set write access when O_TRUNC is used
authorqmuntal <quimmuntal@gmail.com>
Wed, 16 Oct 2024 14:33:03 +0000 (16:33 +0200)
committerGopher Robot <gobot@golang.org>
Mon, 21 Oct 2024 18:32:52 +0000 (18:32 +0000)
commit67f662b29165a0fb27dd15e9370b6e411a653c95
treee58afb008e3bf697f924e850afb76aa52893034a
parent813d9ea524e4d75ef2e4aaa358e8b45ac8b3547c
internal/syscall/windows: set write access when O_TRUNC is used

Whenn O_TRUNC is set, Opentat ends up calling syscall.Ftruncate, which
needs write access. Make sure write access is not removed when O_TRUNC
and O_APPEND are both set.

Updates #67002.

Change-Id: Iccc470b7be3c62144318d6a707057504f3b74c97
Reviewed-on: https://go-review.googlesource.com/c/go/+/620576
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Damien Neil <dneil@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
src/internal/syscall/windows/at_windows.go
src/internal/syscall/windows/at_windows_test.go [new file with mode: 0644]