]> git.ipfire.org Git - thirdparty/coreutils.git/commit
id: fail when getuid, getgid, etc. fail, e.g., on GNU/Hurd
authorLudovic Courtès <ludo@gnu.org>
Sat, 12 Nov 2011 00:25:45 +0000 (01:25 +0100)
committerJim Meyering <meyering@redhat.com>
Mon, 14 Nov 2011 08:52:42 +0000 (09:52 +0100)
commit40324ca8b22a538e31aa2f9a8ac03f03f7d0537e
tree4a5a2c43a3bf870f64bf5e27fdd5aa342be246d1
parentb8b6dd27a61dce58d6537dfbee65c7428f4ae3cd
id: fail when getuid, getgid, etc. fail, e.g., on GNU/Hurd

POSIX-conforming getuid, geteuid, etc. functions cannot fail,
but on GNU/Hurd systems and some others, they may.
* src/id.c (main) [__GNU__]: Detect and diagnose any such failure.
* tests/id/gnu-zero-uids: New file.
* tests/Makefile.am (TESTS): Add it to the list.
* tests/init.cfg (require_gnu_): New function.
src/id.c
tests/Makefile.am
tests/id/gnu-zero-uids [new file with mode: 0755]
tests/init.cfg