[OpenAFS-devel] solaris 10: chdir("/") after chroot(path) returns ENOENT

Tony D'Amato tdamato@odu.edu
Tue, 08 Jun 2010 13:00:32 -0400


>> > chdir(AFS_PATH);
>> > chroot(AFS_PATH);
>> > chdir("/");
>> >
>> > The problem is that the third call (chdir("/")) returns a ENOENT error.
> We're given an empty pathname component when this occurs, so we're
> looking up "" in the parent dir; afs_lookup can't cope with that. If I
> fake it so we pass in "." to afs_lookup when we detect this happening,
> it seems to work.
>
> Hmm, is something like that a plausible solution, or should afs_lookup
> just be made to interpret looking up a "" entry as looking up the
> directory itself?
>

Honestly, I'm not sure (y'all are the developers, not me *grin*).
I ran the same code on OpenAFS 1.4.12 on RHEL5, Solaris 8 and Solaris 
10. The Solaris 10 client is the only one that returns ENOENT.

-- 
Tony D'Amato, SCSA
Senior UNIX Systems Administrator
Server Support Group
Office of Computing and Communications Services
Old Dominion University