]> Cypherpunks.ru repositories - gostls13.git/commitdiff
syscall: use fchmodat2 in Fchmodat
authorTobias Klauser <tklauser@distanz.ch>
Tue, 7 Nov 2023 12:10:48 +0000 (13:10 +0100)
committerGopher Robot <gobot@golang.org>
Wed, 8 Nov 2023 17:55:49 +0000 (17:55 +0000)
The fchmodat2 syscall was added in Linux kernel 6.6.  Mirror the
implementation in golang.org/x/sys/unix.Fchmodat (CL 539635) and use
fchmodat2 in Fchmodat if flags are given. It will return ENOSYS on older
kernels (or EINVAL or any other bogus error in some container
implementations).

Also update ztypes_linux_$GOARCH.go for all linux platforms to add
_AT_EMPTY_PATH. It was added to linux/types in CL 407694 but was only
updated for linux/loong64 at that time.

Updates #61636

Change-Id: I863d06e35cd366f1cf99052e9f77c22ab8168b3f
Reviewed-on: https://go-review.googlesource.com/c/go/+/540435
Reviewed-by: Mauri de Souza Meneguzzo <mauri870@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>


No differences found