support.intranet wrote: > Hello! I'm writing a small script and I need to call the > os.chroot function. The problem is, a few lines below I need to > call a program in /usr/bin. Is there a way to exit from the > chroot, or to limit the chroot to a single function or thread? > Thanks in advance
No, chroot applies to the whole process and once applied it can't be reverted. Otherwise the whole idea of chroot being a FS jail would not work. So you need some programs in your chroot: Then put a directory usr/bin into the chroot directory and bind the system's /usr/bin there: mount --bind /usr/bin $chroot/usr/bin The same has to be done with all library stuff. Another option would be to place a statically linked busybox and it's subprogram links into the chroot Wolfgang Draxinger -- E-Mail address works, Jabber: [EMAIL PROTECTED], ICQ: 134682867 -- http://mail.python.org/mailman/listinfo/python-list