diff options
author | Jim Meyering <meyering@redhat.com> | 2009-05-29 08:44:56 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2009-06-02 16:34:54 +0200 |
commit | b96cd035ffe636f95cffc4beb7c043c62a687045 (patch) | |
tree | 55859aaf87d8cc46377f4de5edd746f1abf77576 /tests/chroot | |
parent | 2e62250e987dfb2e6253f512ef52707edc626719 (diff) | |
download | coreutils-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-x | tests/chroot/credentials | 2 |
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 |