jailsetup: sanitize locations of utilities installed into chroot
commit752b5303b3db008d1259c7815f3bc8d1bf2497aa
authorKyle J. McKay <mackyle@gmail.com>
Wed, 21 Dec 2016 02:35:16 +0000 (20 18:35 -0800)
committerKyle J. McKay <mackyle@gmail.com>
Wed, 21 Dec 2016 02:35:16 +0000 (20 18:35 -0800)
tree1c025ce66f938cc5f230ac1656f2dfc4ece25367
parentd3b5ee5409decaa88e0f1797904d34b498a5313b
jailsetup: sanitize locations of utilities installed into chroot

Besides Git, SSH and Girocco utilities, the only things that should
be installed into the chroot are standard "POSIX" utilities.

To that end, be paranoid about making sure the utility picked up
for installation into the chroot comes from a "standard" system
location and not some arbitrary thing in $PATH.

Also do a better job validating that the binary selected for sshd
actually exists, is executable and is readable before proceeding.

Finally, allow a custom sshd location to be configured just in case
there are some special considerations or special sshd binary needed
for the chroot.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
Girocco/Config.pm
jailsetup.sh