[OpenAFS-devel] getcwd() on Linux 2.6.18+OpenAFS 1.4.2 bugs/errors.

Michael Loftis mloftis@wgops.com
Thu, 08 Nov 2007 16:54:03 -0700


--On November 8, 2007 3:46:16 PM -0800 Russ Allbery <rra@stanford.edu> 
wrote:

> Jim Rees <rees@umich.edu> writes:
> <...>
>> I'll admit that what you've seen can be surprising.  That's why most
>> file systems prohibit loops.  It would be nice if afs could do this but
>> it would be hard to implement.  And if we did, you would lose your
>> /afs/mw shortcut.
>
> The issue is with multiple paths to the same directory, which doesn't
> require a loop.

Precisely.  See my other response about using my findings in conjunction 
with yours to maybe crawl out of a chroot....not entirely sure.  Jeffrey 
Altman replied with some chroot related information but I haven't had a 
chance to look at it yet.
>
> Does the same problem happen with bind mounts?  And if not, can we use
> whatever solution was used for bind mounts to fix this problem?

It doesn't.  Bind mounts work quite differently.  Inside the kernel it 
recognizes the mount traversal, something AFS isn't causing right now.  The 
kernel "sees" the mount targets, even though they end up pointing to the 
same filesystem structures as the source of the bind mount.