Re: Exit from os.chroot()

2008-06-05 Thread Thomas Bellman
Tobiah <[EMAIL PROTECTED]> writes: >> It is better to make copies of the needed binaries and libraries, >> and *only* them. > Or symbolic links, of course. Also, wouldn't links prevent > the process from puffing actual binaries in /usr/bin? Well, if you create symlinks from the chroot jail that

Re: Exit from os.chroot()

2008-06-04 Thread Remy Blank
Thomas Bellman wrote: That might not be the best idea... Suddenly the chroot:ed program has access to the real /usr/bin; and since it likely is running as root (it was allowed to call chroot()), it can do bad things to the things in /usr/bin. If a chrooted process is running as root, it can v

Re: Exit from os.chroot()

2008-06-04 Thread Tobiah
>> 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 > > It is better to make copies of the needed binaries and libraries, > and *only* them. Or symbolic links,

Re: Exit from os.chroot()

2008-06-04 Thread Thomas Bellman
Wolfgang Draxinger <[EMAIL PROTECTED]> wrote: > 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 That might not be the best idea... Suddenly the chroot:ed program ha

Re: Exit from os.chroot()

2008-06-04 Thread support . intranet
On 4 Giu, 17:08, Wolfgang Draxinger <[EMAIL PROTECTED]> wrote: > 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

Re: Exit from os.chroot()

2008-06-04 Thread Wolfgang Draxinger
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 N

Exit from os.chroot()

2008-06-04 Thread support.intranet
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 -- http://mail.python.org/mailman