]> Cypherpunks repositories - gostls13.git/commit
syscall: support Faccessat flags argument
authorIan Lance Taylor <iant@golang.org>
Fri, 27 Jul 2018 17:48:18 +0000 (10:48 -0700)
committerIan Lance Taylor <iant@golang.org>
Fri, 27 Jul 2018 21:13:43 +0000 (21:13 +0000)
commitd970519086765367f545186d860080059c69fad8
tree6c6606c562a92d518c25db68823f0b8532ecef0e
parent902fc114272978a40d2e65c2510a18e870077559
syscall: support Faccessat flags argument

The Linux kernel faccessat system call does not take a flags parameter.
The flag parameter to the C library faccessat function is implemented in C.
The syscall.Faccessat function takes a flags parameter. In older releases
we have passed the flags parameter to the kernel, which ignored it.
In CL 120015 we started returning an error if any flags were set.
That seems clearly better than ignoring them, but it turns out that some
code was using the flags. The code was previously subtly broken.
Now it is obviously broken. That is better, but we can do better still:
we can implement the flags as the C library does. That is what this CL does.

Change-Id: I259bd6f240c3951e939b81c3032dead3d9c567b4
Reviewed-on: https://go-review.googlesource.com/126415
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
19 files changed:
src/syscall/syscall_linux.go
src/syscall/syscall_linux_386.go
src/syscall/syscall_linux_arm.go
src/syscall/syscall_linux_arm64.go
src/syscall/syscall_linux_mips64x.go
src/syscall/syscall_linux_mipsx.go
src/syscall/syscall_linux_ppc64x.go
src/syscall/syscall_linux_s390x.go
src/syscall/syscall_linux_test.go
src/syscall/zsyscall_linux_386.go
src/syscall/zsyscall_linux_arm.go
src/syscall/zsyscall_linux_arm64.go
src/syscall/zsyscall_linux_mips.go
src/syscall/zsyscall_linux_mips64.go
src/syscall/zsyscall_linux_mips64le.go
src/syscall/zsyscall_linux_mipsle.go
src/syscall/zsyscall_linux_ppc64.go
src/syscall/zsyscall_linux_ppc64le.go
src/syscall/zsyscall_linux_s390x.go