]> git.ipfire.org Git - thirdparty/coreutils.git/commit
chroot: make --groups= work without --userspec=; be more robust
authorJim Meyering <meyering@redhat.com>
Fri, 29 May 2009 06:44:56 +0000 (08:44 +0200)
committerJim Meyering <meyering@redhat.com>
Tue, 2 Jun 2009 14:34:54 +0000 (16:34 +0200)
commitb96cd035ffe636f95cffc4beb7c043c62a687045
tree55859aaf87d8cc46377f4de5edd746f1abf77576
parent2e62250e987dfb2e6253f512ef52707edc626719
chroot: make --groups= work without --userspec=;  be more robust

* src/chroot.c (set_additional_groups): Add comments.
Given an empty or all-comma group list, diagnose it and return nonzero.
When more than one group is invalid, diagnose all of them,
not just the first.
(main): Honor --groups= also when --userspec= is not specified.
Now that set_additional_groups consistently diagnoses its failures,
don't diagnose it separately here.
* tests/chroot/credentials: Do not invoke with an empty group list.
src/chroot.c
tests/chroot/credentials