From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [RFC] [PATCH] Stacking support for inode_init_security Date: Tue, 6 Sep 2005 12:42:12 +0100 Message-ID: <20050906114212.GD5309@infradead.org> References: <20050819204712.GA9463@serge.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org, linux-security-module@wirex.com, Alexander Viro , Ext2-devel@lists.sourceforge.net, Andreas Gruenbacher , Andreas Dilger , Christoph Hellwig , Andrew Morton , Stephen Tweedie , Stephen Smalley , James Morris , Chris Wright Return-path: Received: from pentafluge.infradead.org ([213.146.154.40]:10969 "EHLO pentafluge.infradead.org") by vger.kernel.org with ESMTP id S964817AbVIFLmP (ORCPT ); Tue, 6 Sep 2005 07:42:15 -0400 To: hallyn@serge.ibm.com Content-Disposition: inline In-Reply-To: <20050819204712.GA9463@serge.ibm.com> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Fri, Aug 19, 2005 at 03:47:12PM -0500, hallyn@serge.ibm.com wrote: > The following patch changes the (new to -mm) inode_init_security > function to support multiple LSMs. It does this by placing the > three passed arguments (name, value, len) into a structure, and > passing in a list_head, onto which the structure can be appended. > The callers (filesystems) call their _xattr_set functions > on each returned (name, value, len) set. > > This is useful both for the stacker LSM, and for any two (or more) > LSMs which might want to cooperate even without stacker. > > I've tested it under a plain selinux-enabled 2.6.13-rc6-mm1 using > Stephen Smalley's sample exploit originally motivating > inode_init_security, as well as with a simple 'touch ab; ls -Z ab'. > > I've also tested it with a corresponding stacker patch, with > selinux stacked with two test LSMs which simply define > inode_init_security. Again, this passed the sample exploit, and > manually inspecting the .security xattrs gave the expected results. I'm personally against supporting stacking LSMs, but if the relevant maintainers decided we really want to have them this patch is nessecary to support it and thus okay.