###  Hotfix for 4859

### Edit /etc/rc.local --- Change the files following:

echo Setting up SSH CHROOT binds.
mount --bind /bin /export/home/groups/bin
mount --bind /lib /export/home/groups/lib
mount --bind /tmp /export/home/groups/tmp
mount --bind /etc /export/home/groups/etc
mount --bind /usr /export/home/groups/usr
mount --bind /dev /export/home/groups/dev
mount --bind /cvsroot /export/home/groups/cvsroot
mount --bind /export /export/home/groups/export
mount --bind /export1 /export/home/groups/export1
mount --bind /proc /export/home/groups/proc
mount --bind /home /export/home/groups/home


# Run as root
umount /export/home/groups/etc/passwd
umount /export/home/groups/etc/group
umount /export/home/groups/usr/lib/perl5
umount /export/home/groups/bin/cvssh.pl

mv /export/home/groups/var /export/home/groups/var2 

mv /export/home/groups/usr /export/home/groups/usr2
mkdir /export/home/groups/usr
mount --bind /usr /export/home/groups/usr

mv /export/home/groups/etc /export/home/groups/etc2
mkdir /export/home/groups/etc
mount --bind /etc /export/home/groups/etc

mv /export/home/groups/tmp /export/home/groups/tmp2
mkdir /export/home/groups/tmp
mount --bind /tmp /export/home/groups/tmp

mv /export/home/groups/bin /export/home/groups/bin2
mkdir /export/home/groups/bin
mount --bind /bin /export/home/groups/bin

mkdir /export/home/groups/export
mount --bind /export /export/home/groups/export

umount /export/home/groups/cvsroot
mount --bind /cvsroot /export/home/groups/cvsroot

mkdir /export/home/groups/dev
mount --bind /dev /export/home/groups/dev

mkdir /export/home/groups/proc
mount --bind /proc /export/home/groups/proc

chmod 0711 /export/home/groups/etc
chmod o-r /export

#
# Remove etc2 var2 tmp2 usr2 bin2
#
