Doing a 'chroot' from Perl 
Author Message
 Doing a 'chroot' from Perl

I need to write an app that does a 'chroot', is there a way to do
that?  I can do it brute-force via the chroot(1) app, and just pass
the rest of my app in as its command line.  [Amusingly, I can even do
this with my *own* app, without having to split my app in two: by
doing something like:

Quote:
>>> if (-d "/home")
>>> {  # There's no '/home' in the chroot hierarchy!!
>>>    # ...and yes, the chroot hierarchy has to have *this* program
>>>    # ...in the same place as the real hierarchy (plus all of the libs
>>>    # ... and everything else you need to execute afresh).  LABTYD.

>>> }
>>> # If you get here, then it is the chroot'ed iteration.

Right at the beginning of the program...

But I was wondering if there might be a more elegant way to manage it
directly within perl...

Thanks!
   /Bernie\



Sat, 02 Nov 2002 03:00:00 GMT  
 Doing a 'chroot' from Perl
On Tue, 16 May 2000 17:53:35 -0400, Bernard Cosell

Quote:

} I need to write an app that does a 'chroot', is there a way to do
} that?

Feh.. what a loser I am..   I was *SURE* I looked through all of the
perl docs, but after an email or two this morning I see that even the
most cursory peek at both the online docs and the Camel book show
"chroot", right there where it belongs.  Sigh...  Apologies.. I can't
imagine what delusion possessed me yesterday...

  /Bernie\



Sun, 03 Nov 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. acces dBase IV tables wit

2. http proxy in chroot'ed environment doesn't work - help

3. Perl in a chroot'ed environment

4. installing perl is the easiest thing I've ever done since learning how to sleep

5. Bug in perl doing eval's

6. HASH

7. query and Sql Server 6.0

8. Error "Full dBase expressions not allowed"

9. Can't open SDBM file doing CGI

10. don't know if this can be done.to do with splitting up file names

11. Can't be done??

12. What i'm i doing wrong help!!

 

 
Powered by phpBB® Forum Software