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

Andrew Deason adeason@sinenomine.net
Tue, 8 Jun 2010 11:21:52 -0500


On Tue, 08 Jun 2010 11:05:23 -0500
"Douglas E. Engert" <deengert@anl.gov> wrote:

> > 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?
> >
> 
> Some other test results:
> Using chdir("/.") works as well as chdir("/home") where
> home is a symlink to .
> 
> The tests work on Solaris 9, but fail on Solaris 10. The results are
> the same if the chroot is to the top level directory in a volume or a
> sub directory.
> 
> Sounds like your fix might work.

A proposed fix is in gerrit 2096 (which alters afs_lookup to accomodate
this). I'm fairly sure it fixes this behavior; I'm just not sure if it's
okay to do that on other platforms, or if we need to restrict it to
solaris. It's at least the right thing to do on solaris, as other
filesystems in the opensolaris code have an explicit check to do this
exact thing.

-- 
Andrew Deason
adeason@sinenomine.net