I mostly deal with chroot environments and today I put some of my time over it. The question that come to me is How to Break up chroot() jail? Sounds tricky to me initially. But its simple, root user cant be chrooted. If he does, he can break it. Simple logic.
1. Create a temp dir and chroot to it. 2. Change the current working dir by repeattedly running chdir(..). 3. Run chroot(.) and this makes you to move to root dir.
Going to home for this week end and hope the week end would be great.