Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Re: Re: Re: Re: Re: Re: Re: exiting a chroot environment

by sauoq (Abbot)
on Jul 09, 2003 at 02:10 UTC ( #272541=note: print w/ replies, xml ) Need Help??


in reply to Re: Re: Re: Re: Re: Re: Re: exiting a chroot environment
in thread exiting a chroot environment

explains why Linux allows users to escape a chroot() jail

Ah, but Linux, AFAIK, doesn't allow just any user to escape the chroot() environment. It only allows the super-user to escape it.

I think we might be referring to two different special cases.

As for when /.. = /. = / is implemented, I wouldn't think it would happen during mkfs because mkfs would have no way of knowing whether the filesystem in question would be used as the root fs or not. (Might there be something going on when the root fs is mounted?) My understanding of this stuff is admittedly weak; I'd be happy to receive some enlightenment.

-sauoq
"My two cents aren't worth a dime.";


Comment on Re: Re: Re: Re: Re: Re: Re: Re: exiting a chroot environment
Re: Re: Re: Re: Re: Re: Re: Re: Re: exiting a chroot environment
by MarkM (Curate) on Jul 09, 2003 at 02:27 UTC

    The root file system is the only file system that doesn't need /. and /.. to be special.

    The special case is when a file system is mounted as a non-root filesystem, as then /mount/point/.. needs to appear to refer to the same inode as /mount does. The same is true of chroot(). The Linux code seems to jump through quite a few hoops (with functions names like 'graft_tree()') to deal with mounts...

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://272541]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (12)
As of 2014-08-28 16:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (264 votes), past polls