Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 3 Jul 1998 10:17:09 +0000 (GMT)
From:      Terry Lambert <tlambert@primenet.com>
To:        sthaug@nethelp.no
Cc:        dkelly@hiwaay.net, freebsd-hackers@FreeBSD.ORG
Subject:   Re: permission confusion at mount points
Message-ID:  <199807031017.DAA15756@usr04.primenet.com>
In-Reply-To: <19506.899446178@verdi.nethelp.no> from "sthaug@nethelp.no" at Jul 3, 98 08:09:38 am

next in thread | previous in thread | raw e-mail | index | archive | help
> > > Should the mount point really influence permissions this way w/o
> > > giving any indication of this?  Or is this behavior unintentional?
> > > Is it worth a PR?
> > 
> > Its that way in every Unix I've used. Can't think of one that it doesn't
> > act up, but somebody would point out the odd system if I was to claim
> > more than I know and say *all* unices.
> 
> Yes, I've seen this trip the unwary on many different Unix systems. I've
> never seen a reason for *why* it has to be this way.
> 
> Can anybody enlighten us why?

The reason is that FS's "cover" mount points.  This means that the
mount points are evaluated before the "covering" values are discerned.

Practically, this means you determine if the person has access to the
vnode being covered before you replace it with the vnode doing the
covering.


I personally think that the idea of mapping a vnode into an existing
directory hierarchy should *not* require acess to the existing
hierarchy to implement.

My idea is that you seperate the act of mapping from the act of lookup;
this is a little inconvenience, in that you ignopre the mapping point
in favor of that which is mapped.  It has the advantage that "X" replaces
"Y" instead of "X" predicates "Y".   In more simple terms, it means that
the mounted FS permissions are checked instead of the mount point
permissions before acces is granted.

This is really an issue of data hiding more than anything else, since
it has to do with when permissions are evaluated.

You could look at this as being like VT100 "am"; the value of the
permissions are evaluated before the 81st charater instead of after
the 80th.

There are a number of *very nice* consequences to looking at mapping
into the FS namespace this way, starting with the ability to automount
removable media into the hierarchy.  This is more of an issue for
mobile computing and/or CD changers; never the less, the idea has a
certain value above and beyond the simple act of dynamic configuration
of system resources...


					Terry Lambert
					terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199807031017.DAA15756>