]> Cypherpunks repositories - gostls13.git/commit
syscall: use Android O friendly fstatat syscall to implement Stat on linux/amd64
authorTobias Klauser <tklauser@distanz.ch>
Thu, 15 Mar 2018 09:45:51 +0000 (10:45 +0100)
committerTobias Klauser <tobias.klauser@gmail.com>
Thu, 15 Mar 2018 10:07:57 +0000 (10:07 +0000)
commit107325627b584968b9408565e8ff50ef11b229e2
treebff9da78b0db112b134b6f9d8911c0fc5f80caf0
parent5fcfe6b6ae53ed5e5cf43250c96cc40c2790fb3a
syscall: use Android O friendly fstatat syscall to implement Stat on linux/amd64

The Android O seccomp policy disallows the stat syscall on amd64, see
https://android.googlesource.com/platform/bionic/+/android-4.2.2_r1.2/libc/SYSCALLS.TXT

Use the fstatat syscall with AT_FDCWD and zero flags instead to achieve
the same behavior.

Fixes #24403

Change-Id: I36fc9ec9bc938cd8e9de30f66c0eb9d2e24debf6
Reviewed-on: https://go-review.googlesource.com/100878
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Elias Naur <elias.naur@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/syscall/syscall_linux_amd64.go
src/syscall/zsyscall_linux_amd64.go