Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

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

by sauoq (Abbot)
on Jul 09, 2003 at 02:10 UTC ( [id://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

Replies are listed 'Best First'.
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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://272541]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (3)
As of 2024-04-24 01:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found