aboutsummaryrefslogtreecommitdiff
path: root/src/syscall/zsyscall_linux_amd64.go
diff options
context:
space:
mode:
authorElias Naur <elias.naur@gmail.com>2018-09-22 10:30:05 +0200
committerElias Naur <elias.naur@gmail.com>2018-09-24 17:08:51 +0000
commitf25656d392b38da362afb997e75bc43af49d514c (patch)
tree5965bb5e4627effc7ff3eeb2106fa284fb6f659c /src/syscall/zsyscall_linux_amd64.go
parent6054fef17f2eedf3ef4825b6ca5b97e2ecf53bd6 (diff)
downloadgo-f25656d392b38da362afb997e75bc43af49d514c.tar.xz
syscall: replace lstat, lchown, stat to please Android O
Implement Lstat with fstatat and Lchown with Fchownat on linux/amd64, linux/arm and linux/386. Furthermore, implement Stat with fstatat on linux/arm and linux/386. Linux/arm64 already had similar replacements. The fstatat and fchownat system calls were added in kernel 2.6.16, which is before the Go minimum, 2.6.23. The three syscalls then match the android bionic implementation and avoids the Android O seccomp filter. Fixes #27797 Change-Id: I07fd5506955d454a1a660fef5af0e1ac1ecb0959 Reviewed-on: https://go-review.googlesource.com/136795 TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/syscall/zsyscall_linux_amd64.go')
-rw-r--r--src/syscall/zsyscall_linux_amd64.go30
1 files changed, 0 insertions, 30 deletions
diff --git a/src/syscall/zsyscall_linux_amd64.go b/src/syscall/zsyscall_linux_amd64.go
index b6638269be..9f2046bf93 100644
--- a/src/syscall/zsyscall_linux_amd64.go
+++ b/src/syscall/zsyscall_linux_amd64.go
@@ -1261,21 +1261,6 @@ func Iopl(level int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Lchown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Listen(s int, n int) (err error) {
_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)
if e1 != 0 {
@@ -1286,21 +1271,6 @@ func Listen(s int, n int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Lstat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {