linux emulation: "/ " resolves to real root dir; why ?

Andriy Gapon avg at icyb.net.ua
Mon Oct 25 05:05:51 PDT 2004


on 22.10.2004 20:37 Doug White said the following:
...
>>we are taking about different "break outs". Removing the check will
>>*not* affect accessing any other filesystem node but "/". Only things like
>>	cd /
>>	ls /
>>or
>>	"cd .." from /compat/linux/foo
>>will be affected.
> 
> 
> You missed the point. 

I am sorry but I think that's what you did. You will be able to do "cd
/home" or "ls /home" just fine. Only one filesystem node corresponding
to "/" will be affected.

> This would mean you would not be able to access
> stuff like /home, which would make it awful hard to access user home
> directories, unless you create symlink copies in the /compat/linux tree.

no, see what I wrote above.

> 
> As long as you create the top-level dir in /compat/linux first, mkdir -p
> will Do The Right Thing after that.

No, it will not. As I wrote before it needs all path components but last to
exist, otherwise it will do "cd /" first and this will be the wrong root.

> The port seems to install fine on my systems; it doesn't spam any existing
> files or directories, so I'm not sure why you think linux_base-7 has a
> problem.

I never said that this port has a problem, all I said is that "mkdir -p"
with mkdir from this port doesn't properly work *because of the
discussed linux emulation "feature"*.


-- 
Andriy Gapon


More information about the freebsd-current mailing list