perlfunc: Should chdir("/") immed after chroot
authorJarkko Hietaniemi <jhi@iki.fi>
Thu, 24 Apr 2014 22:16:30 +0000 (18:16 -0400)
committerKarl Williamson <khw@cpan.org>
Sun, 18 May 2014 03:16:22 +0000 (21:16 -0600)
commitb00d10dc3d9b54e2ef58f2627b02bfe99daeae47
tree7199887130d32520379fb68a36d47e06a6d33b87
parente023b52d29900981e0c68349b3ec306d85c0716d
perlfunc: Should chdir("/") immed after chroot

Inspired by Coverity perl5 CID 28931: Insecure chroot: (CHROOT)
chroot_call.

The Perl chroot() is a thin wrapper around the system call, so the
chdir("/") should not go there.  But adding a note about the chdir()
being a good idea to perlfunc/chroot.

The committer reworded the inserted text for grammar and readability,
and the commit message to conform to git standards, and is pushing the
commit with the concurrence of the author.
pod/perlfunc.pod