Untrusted environment: Difference between revisions

Content added Content deleted
(basic draft page)
 
Line 30: Line 30:
Sometimes chroot jails are used to add a layer of security to
Sometimes chroot jails are used to add a layer of security to
<lang bash>mkdir ~/jail
<lang bash>mkdir ~/jail
chdir ~/jail;
cd ~/jail;
chroot ~/jail;
chroot ~/jail;
setXXuid(9); # if 9 is the userid of a non-root user
setuid(9); # if 9 is the userid of a non-root user
rm /etc/hosts # actually points to ~/jail/etc/hosts</lang>
rm /etc/hosts # actually points to ~/jail/etc/hosts</lang>