• Ian Lance Taylor's avatar
    unix: support Faccessat flags argument · bd9dbc18
    Ian Lance Taylor authored
    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 unix.Faccessat function takes a flags parameter. In older releases
    we have passed the flags parameter to the kernel, which ignored it.
    In CL 119495 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: I02d4bb981ebd39eb35e47c6e5281f85eaea68016
    Reviewed-on: https://go-review.googlesource.com/126516
    Run-TryBot: Ian Lance Taylor <iant@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    bd9dbc18
syscall_linux_test.go 10.4 KB