• Chris Koch's avatar
    unix: solicit EPERM via wrong PID in creds test. · f67933ea
    Chris Koch authored
    In a Linux user namespace that doesn't have UID 0 mapped, WriteMsgUnix
    will return an EINVAL as the uid-valid-in-uns check comes first in the kernel.
    
    Even if in a user and PID namespace, using the wrong PID in Ucred will
    always give EPERM.
    
    Change-Id: Ia7452bbf2911c3b9a2aa5d7df1572e8b0790ff38
    GitHub-Last-Rev: 341d3f0cba0511411caffd2ac5a6c8dfb7a022ef
    GitHub-Pull-Request: golang/sys#7
    Reviewed-on: https://go-review.googlesource.com/103857
    Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarTobias Klauser <tobias.klauser@gmail.com>
    f67933ea
creds_test.go 3.52 KB