Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chroot: rejects multiple instances of --groups option but shouldn't #7063

Closed
jfinkels opened this issue Jan 3, 2025 · 1 comment · Fixed by #7123
Closed

chroot: rejects multiple instances of --groups option but shouldn't #7063

jfinkels opened this issue Jan 3, 2025 · 1 comment · Fixed by #7123

Comments

@jfinkels
Copy link
Collaborator

jfinkels commented Jan 3, 2025

Environment: Ubuntu 20.04, uutils main branch (git commit 88cdf16), GNU coreutils v8.30.

Steps to reproduce:

sudo chroot --groups='invalid ignored' --groups='' / id -G

What happens now: the argument parsing in uutils chroot complains that the argument cannot be used multiple time:

error: the argument '--groups <GROUP1,GROUP2...>' cannot be used multiple times

Usage: ./target/debug/chroot [OPTION]... NEWROOT [COMMAND [ARG]...]

For more information, try '--help'.

What I expected to happen: GNU chroot takes only the last instance of --groups and successfully outputs the result of id -G:

0

Notes: this is causing a failure in the GNU test file tests/chroot/chroot-credentials.sh.

@jfinkels
Copy link
Collaborator Author

jfinkels commented Jan 3, 2025

Related to #5998

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant