Skip to content

chroot: fails to parse valid userspec of the form uid: or :gid #7040

@jfinkels

Description

@jfinkels

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

Steps to reproduce:

sudo chroot --userspec=65534: / pwd

What happens now: uutils chroot fails with

chroot: invalid userspec: '65534:'

What I expected to happen: GNU chroot succeeds and prints

/

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

The same issue occurs if you provide only the group ID, as in --userspec=:65534.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions