[OpenAFS-devel] Re: solaris 10: chdir("/") after chroot(path) returns ENOENT
Andrew Deason
adeason@sinenomine.net
Tue, 8 Jun 2010 10:29:50 -0500
On Tue, 08 Jun 2010 09:20:51 -0400
"Tony D'Amato" <tdamato@odu.edu> wrote:
> 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?
--
Andrew Deason
adeason@sinenomine.net