Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2
I was considering changing the coreutils tests from using
the internal setuidgid test utility to chroot --user...
to give more coverage for the latter.
However I noticed that chroot changes directory to /
even when we're just using it to change user IDs
(by specifying / as the "new" root).
So I was wondering about the attached to avoid the
chdir("/") in this case? The chdir() is done to enhance
security a bit, but also for consistency. If we'd not
actually changing root dir then there are no security implications,
but I'm a bit worried about the consistency angle.
Now --user is a newish feature anyway so I'm not
that worried about breaking old scripts that assume
the implicit chdir("/").
thanks,
Pádraig.