chroot: don't set bogus user-ID or group-ID for --u=U: or --u=:G
authorJim Meyering <meyering@redhat.com>
Wed, 27 May 2009 21:06:15 +0000 (23:06 +0200)
committerJim Meyering <meyering@redhat.com>
Tue, 2 Jun 2009 14:34:53 +0000 (16:34 +0200)
commit2e62250e987dfb2e6253f512ef52707edc626719
treeb026ed22fd91612cbbcb0479782214035663f8b4
parentbb7ff3bccdf643bbe4ae01c09db996e79092da80
chroot: don't set bogus user-ID or group-ID for --u=U: or --u=:G

* src/chroot.c (main): Initialize both "uid" and "gid".  To -1.
This also allows one to set the user-ID or primary group-ID to 0,
in case it's not that already.
* tests/chroot/credentials: Test for the above.
src/chroot.c
tests/chroot/credentials