From: Jan Hudec Subject: Re: changing permission()/vfs_permission... to work on dentry Date: Thu, 29 May 2003 14:25:48 +0200 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <20030529122548.GF771@vagabond> References: <1054154587.9356.15.camel@zaphod> <20030528214822.GF14138@parcelfarce.linux.theplanet.co.uk> <1054161272.9349.50.camel@zaphod> <20030528225308.GG14138@parcelfarce.linux.theplanet.co.uk> <1054168407.9962.45.camel@zaphod> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: viro@parcelfarce.linux.theplanet.co.uk, linux-fsdevel@vger.kernel.org Return-path: Received: from cimice4.lam.cz ([212.71.168.94]:34551 "EHLO vagabond.cybernet.cz") by vger.kernel.org with ESMTP id S261311AbTE2MM5 (ORCPT ); Thu, 29 May 2003 08:12:57 -0400 To: Shaya Potter Content-Disposition: inline In-Reply-To: <1054168407.9962.45.camel@zaphod> List-Id: linux-fsdevel.vger.kernel.org On Wed, May 28, 2003 at 08:33:27PM -0400, Shaya Potter wrote: > On Wed, 2003-05-28 at 18:53, viro@parcelfarce.linux.theplanet.co.uk > wrote: > > Erm. Based on a _pathname_? I.e. just on a string? > > yes. The issue we are trying to solve (much like SubDomain > http://www.immunix.org/subdomain.html) is that you have a single fs, but > not every application needs access to that entire namespace, but from an > administrative point of view, its easier to deal w/ a single namespace. > For instance, sendmail doesn't need /bin/sh, it be fairly hard to > administrate a sendmail box that didn't have it though. If there's no > /bin/sh in the processes "namespace" (used loosely, as in mode 000 to it > and even uid 0 processes) the ability to get a root shell is limited. > > The problem is, one would have a problem storing all this attribute data > for every file in a system as there can be many contexts. If one can > store the rules instead and use "string compares" (well, not really > string compares as that could be too slow) one can partition off the > applications. > > So why not chroot? well, it doesn't work so well for uid 0 apps, as > they can chroot themselves again. and even if that wasn't an issue, one > isn't operating under a single namespace anymore so it makes > administration harder. Perhaps it's a stupid idea, but couldn't you resolve the names to inode numbers first (though it would require checking when something happens to those inodes)? I would expect you need to make the file (eg. shell) unaccessible and not just one of it's dentries (eg. /bin/sh). Perhaps this would be solved by the intent patches anyway. Since the intent should be passed to all the methods, it should make it to permission too. And since it will probably be boud to nameidata, it would include everything (even the vfsmount). ------------------------------------------------------------------------------- Jan 'Bulb' Hudec