• Elias Naur's avatar
    syscall: replace lstat, lchown, stat to please Android O · f25656d3
    Elias Naur authored
    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: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    f25656d3
syscall_linux_amd64.go 5.01 KB