mirror of
https://github.com/golang/sys.git
synced 2026-02-08 11:46:04 +03:00
c23410a886927bab8ca5e80b08af6a56faeb330d
Currently Linux' fchmodat(2) syscall implementation doesn't support the flags parameter (though it might in future versions [1]). Fchmodat in x/sys/unix takes the parameter and (wrongly) passes it on to the syscall which will ignore it. According to the POSIX.1-2008 manual page [2], AT_SYMLINK_NOFOLLOW is the only valid value for the flags parameter and EOPNOTSUPP should be returned in case changing the mode of a symbolic link is not supported by the underlying system. EINVAL should be returned for any other value of the flags parameter. [1] https://patchwork.kernel.org/patch/9596301/ [2] http://pubs.opengroup.org/onlinepubs/9699919799/functions/chmod.html Change the Fchmodat implementation accordingly and also add the corresponding test. Fixes golang/go#20130 Change-Id: I62e677e6674d3702eaf388af0ac3d7e623a35c24 Reviewed-on: https://go-review.googlesource.com/46474 Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This repository holds supplemental Go packages for low-level interactions with the operating system. To submit changes to this repository, see http://golang.org/doc/contribute.html.
Description
Languages
Go
85.8%
Assembly
12.3%
Shell
1.7%
C
0.1%