From: Trond Myklebust Subject: Re: [PATCH 2/8] move xattr permission checks into the VFS Date: Mon, 31 Oct 2005 22:33:23 -0500 Message-ID: <1130816004.19963.16.camel@lade.trondhjem.org> References: <20051101023019.GB23378@lst.de> <1130815329.19963.8.camel@lade.trondhjem.org> <20051101032451.GA24312@lst.de> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Cc: akpm@osdl.org, linux-fsdevel@vger.kernel.org Return-path: Received: from pat.uio.no ([129.240.130.16]:25578 "EHLO pat.uio.no") by vger.kernel.org with ESMTP id S964975AbVKADdk (ORCPT ); Mon, 31 Oct 2005 22:33:40 -0500 To: Christoph Hellwig In-Reply-To: <20051101032451.GA24312@lst.de> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Tue, 2005-11-01 at 04:24 +0100, Christoph Hellwig wrote: > On Mon, Oct 31, 2005 at 10:22:09PM -0500, Trond Myklebust wrote: > > > + /* > > > + * No restriction for security.* and system.* from the VFS. Decision > > > + * on these is left to the underlying filesystem / security module. > > > + */ > > > + if (!strncmp(name, XATTR_SECURITY_PREFIX, XATTR_SECURITY_PREFIX_LEN) || > > > + !strncmp(name, XATTR_SYSTEM_PREFIX, XATTR_SYSTEM_PREFIX_LEN)) > > > + return 0; > > > The call to permission() here is not always applicable. Some filesystems > > may have different permissions when it comes to the right to read or set > > ACLs (both AFS and NFSv4, for instance, have such features). > > > > For the NFSv4 client, therefore, I'd like to be able to override this > > particular check (and leave it up to the server to verify that we are > > authorised). > > See the code above. system namespace attributes (which ACLs are) are > never handled in the VFS but always left to the filesystem. Ah... I see... ...but then I'm a bit confused w.r.t. your removal of the checks for S_ISREG(inode->i_mode) & friends in nfs4proc.c nfs4_setxattr(). You motivate the removal by the fact that you've moved those checks into the VFS, but AFAICS we will never hit the VFS checks for the case of system.nfs4_acl (which is the only case we care about right now). Cheers, Trond