Subject: Re: kern/3787: adosfs interprets execute protection on directories as S_IX*
To: David Brownlee <abs@anim.dreamworks.com>
From: Michael van Elst <mlelstv@serpens.swb.de>
List: netbsd-bugs
Date: 06/25/1997 19:56:53
Hi,

> 	Maybe make it a mount time option?

if that's a vote I say NO.

adosfs does not know anything about a directory 'access' permission.
It doesn't have a 'read' permission either that is compatible with
UNIX semantics. You _cannot_ (read: there is no API) read a directory
without doing the equivalent of stat()'ing every entry. So a read
permission is always an access permission. Enforcing foreign semantics
just because there happens to be a 'similar' bit that could be interpreted
_only_ causes problems. What do you want to do when the permission is
"missing" because of such enforced semantics, especially while you
cannot even do a chmod() in the current read-only implementation (nor
would there be a transparent interpretation of semantics in the
other direction).

Michael van Elst

> 		David/abs
> 
> - "It was at that point I realised there might be a chance for myself as a
> -  caring human being. Unable to decide whether to feel hopeful or disgusted,
> -  I chose both and opened a bottle of wine to celebrate"
> 
> On Tue, 24 Jun 1997, Todd Vierling wrote:
> 
> > On Tue, 24 Jun 1997, Michael van Elst wrote:
> > 
> > : 	adosfs translates AmigaOS protection flags into UNIX mode bits.
> > : 	PROTECTION_READ becomes S_IRUSR, PROTECTION_WRITE becomes S_IWUSR
> > : 	and PROTECTION_EXECUTE becomes S_IXUSR (and similar for group
> > : 	and other permissions).
> > : 	For files this is a correct interpretation of semantics, however for
> > : 	directories this is not true. AmigaOS ignores the PROTECTION_EXECUTE
> > : 	bit on directories completely. There is no difference between a
> > : 	readable directory and an accessible directory as in UNIX.
> > : 	As a result a directory without PROTECTION_EXECUTE can be used under
> > : 	AmigaOS but not under NetBSD.
> > 
> > I'm not so sure this should be forced (directories +x).  There are a couple
> > filesystem patches I have sitting around that add access privilege to
> > directories, as well as a third-party addition to MultiUserFileSystem.
> > 
> > I vote this stays as is.  chmod +x the directory if you want to access it ;)
> > 
> > =====
> > == Todd Vierling (Personal tv@pobox.com; Business tv@iag.net) Foo-bar-baz! ==
> > == System administrator/technician, Internet Access Group, Orlando Florida ==
> > == Dialups in Orange, Volusia, Lake, Osceola counties - http://www.iag.net ==
> > 
> 
> 

                                Michael van Elst

Internet: mlelstv@serpens.swb.de
                                "A potential Snark may lurk in every tree."