summaryrefslogtreecommitdiff
path: root/tests/chroot
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2009-05-29 08:44:56 +0200
committerJim Meyering <meyering@redhat.com>2009-06-02 16:34:54 +0200
commitb96cd035ffe636f95cffc4beb7c043c62a687045 (patch)
tree55859aaf87d8cc46377f4de5edd746f1abf77576 /tests/chroot
parent2e62250e987dfb2e6253f512ef52707edc626719 (diff)
downloadcoreutils-b96cd035ffe636f95cffc4beb7c043c62a687045.tar.xz
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.
Diffstat (limited to 'tests/chroot')
-rwxr-xr-xtests/chroot/credentials2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/chroot/credentials b/tests/chroot/credentials
index b76edea7d..58c098f53 100755
--- a/tests/chroot/credentials
+++ b/tests/chroot/credentials
@@ -37,7 +37,7 @@ test "$(chroot --userspec=$NON_ROOT_USERNAME:$NON_ROOT_GROUP / whoami)" != root
|| fail=1
# Verify that there are no additional groups.
-test "$(chroot --userspec=$NON_ROOT_USERNAME:$NON_ROOT_GROUP --groups= / id -nG)"\
+test "$(chroot --userspec=$NON_ROOT_USERNAME:$NON_ROOT_GROUP --groups=$NON_ROOT_GROUP / id -nG)"\
= $NON_ROOT_GROUP || fail=1
# Verify that when specifying only the user name we get the current