Page MenuHomeFreeBSD

Enter chroot before looking up user or group to change to
Needs ReviewPublic

Authored by thj on Tue, Oct 8, 8:35 AM.


Group Reviewers

Before r345132 chroot(8) stated:

If the -u, -g or -G options are given, the user, group and group
list of the process are set to these values after the chroot has
taken place.

chroot looks up the user, grop or group list before entering the chroot.
This leads to usernames that exist in the chroot not being found by the
command on the host and chroot erroring. Instead chroot uses the uid of
the username found on the host as the uid to use in the chroot. This
association is probably not correct and is working unintentionally.

Enter the chroot before looking up the user, group or group list.
Restore the previous sentence to the man page that describes this

Diff Detail

Lint OK
No Unit Test Coverage
Build Status
Buildable 26923
Build 25227: arc lint + arc unit

Event Timeline

thj created this revision.Tue, Oct 8, 8:35 AM