This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: can I use chroot() multiple times in one program


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]