NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/42513: permission denied to "cd .."



The following reply was made to PR kern/42513; it has been noted by GNATS.

From: David Holland <dholland-bugs%netbsd.org@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: kern/42513: permission denied to "cd .."
Date: Wed, 30 Dec 2009 21:53:38 +0000

 On Wed, Dec 23, 2009 at 09:20:00PM +0000, Bernd Ernesti wrote:
  >     A ls -lad from /x showed this:
  >             drwxr-xr-x  28 xx xx 1024 Dec 23 17:03 y
  >     So it should be fine but looking again after unmounting /x/y
  >     showed this for the same directory:
  >             drwx------  2 xx xx  512 Oct 12  2008 y
  > 
  >     Now to the question: Is this a bug or intentional?
  > 
  >     IMHO is this a bug and the cd should use the permissions of the
  >     mounted filesystem and not the one from the underlying fs.
 
 This behavior is historic and near-universal, so whether or not it's a
 bug it's something you need to be prepared to encounter in the wild.
 
 It arises because the logic for crossing through mount points passes
 through both the mounted and mounted-over directories and therefore
 requires access to both.
 
 It may be possible to hack things up so it doesn't happen, but I'm not
 sure that'd be desirable and in any event I wouldn't recommend trying
 it until I finish beating up namei. :-/
 
 Probably the right time to tackle this is when/if we get around to
 adding support for rebind mounts...
 
 -- 
 David A. Holland
 dholland%netbsd.org@localhost
 


Home | Main Index | Thread Index | Old Index