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

Roland Kuhn rkuhn@e18.physik.tu-muenchen.de
Fri, 9 Nov 2007 13:14:07 +0100


This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--Apple-Mail-14--592600469
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed

Hi Jim!

On 9 Nov 2007, at 00:40, Jim Rees wrote:

> Michael Loftis wrote:
>
>   No.  The problem is pwd (getcwd()) returns erroneous information.
>
> You said /afs/mw/u/m/mloftis/var and /afs/modwest.com/u/j/jslife/ 
> var were
> the same thing.  So if you cd to one, it's perfectly normal to  
> "pwd" and get
> the other path.
>
No, bind mounts get this right. I don't know how the magic is worked,  
but the parent of 'var' in the above scenario should be different for  
the two cases.

>   when you chroot it returns paths *outside* the chroot.
>
> It's not outside the chroot.  You've created a path that leads from  
> the
> chroot back to what you call the outside.  This is the behavior I  
> expect.
>
Actually no, no path is created: the getpwd() information is just  
useless...

> It sounds like what you want is for the kernel to keep track not  
> only of the
> files and directories you have open, but the paths by which you got  
> to them.
> Not impossible, but I think it would require changes to the kernel  
> outside
> afs.  And it would change the semantics of the file system.
>
AFS differs from the Linux standard in this respect. I don't know if  
something like this is in POSIX or SUS, but it seems that the current  
AFS semantics are a bit shaky at best.

Ciao,
                     Roland

--
TU Muenchen, Physik-Department E18, James-Franck-Str., 85748 Garching
Telefon 089/289-12575; Telefax 089/289-12570
--
CERN office: 892-1-D23 phone: +41 22 7676540 mobile: +41 76 487 4482
--
Any society that would give up a little liberty to gain a little
security will deserve neither and lose both.  - Benjamin Franklin
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GS/CS/M/MU d-(++) s:+ a-> C+++ UL++++ P+++ L+++ E(+) W+ !N K- w--- M 
+ !V Y+
PGP++ t+(++) 5 R+ tv-- b+ DI++ e+++>++++ h---- y+++
------END GEEK CODE BLOCK------



--Apple-Mail-14--592600469
content-type: application/pgp-signature; x-mac-type=70674453;
	name=PGP.sig
content-description: This is a digitally signed message part
content-disposition: inline; filename=PGP.sig
content-transfer-encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (Darwin)

iD8DBQFHNE8UI4MWO8QIRP0RAo/QAJ4p71XIMIbBEmMafkgCa4aM/zmQ4QCfRP4h
8V5OY7brvZ3UsEvRgMvcpHI=
=lUXl
-----END PGP SIGNATURE-----

--Apple-Mail-14--592600469--