can I use chroot() multiple times in one program
Wu Zhou
woodzltc@gmail.com
Tue Jan 12 16:17:00 GMT 2010
2010/1/12 Ángel González <keisial@gmail.com>:
> Now your chroot is the old /chroot. Thus you are chrooting to where you
> were.
> You may be able to escape the chroot by keeping a file descriptor to the
> original chroot
> See http://www.bpfh.net/simes/computing/chroot-break.html
>
> Note that you are not guaranteed to be able to escape a chroot()
Ah, this mechanism can escape chroot by keeping the old file
descriptor. But it seems not proper for my situation. Thanks any way.
Good to know this.
> Instead of trying to break the chroot, you should move the python script
> into the chroot (you'll
> need to also move the interpreter and its libs).
>
Yes. I can do that in general. Just that this python script has to
look at this chrooted environment back at the original root directory.
Best,
Wu Zhou
More information about the Libc-help
mailing list