xfs
[Top] [All Lists]

Re: [PATCH 00/25] move handling of setuid/gid bits from VFS into individ

To: Jeff Layton <jlayton@xxxxxxxxxx>
Subject: Re: [PATCH 00/25] move handling of setuid/gid bits from VFS into individual setattr functions (RESEND)
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Sat, 11 Aug 2007 03:57:39 +0100
Cc: Trond Myklebust <trond.myklebust@xxxxxxxxxx>, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx, v9fs-developer@xxxxxxxxxxxxxxxxxxxxx, zippel@xxxxxxxxxxxxxx, dhowells@xxxxxxxxxx, linux-cifs-client@xxxxxxxxxxxxxxx, codalist@xxxxxxxxxxxxxxxxxxxxxxxx, joel.becker@xxxxxxxxxx, linux-ext4@xxxxxxxxxxxxxxx, fuse-devel@xxxxxxxxxxxxxxxxxxxxx, cluster-devel@xxxxxxxxxx, user-mode-linux-user@xxxxxxxxxxxxxxxxxxxxx, mikulas@xxxxxxxxxxxxxxxxxxxxxxxx, wli@xxxxxxxxxxxxxx, jffs-dev@xxxxxxxx, jfs-discussion@xxxxxxxxxxxxxxxxxxxxx, ocfs2-devel@xxxxxxxxxxxxxx, reiserfs-devel@xxxxxxxxxxxxxxx, bfennema@xxxxxxxxxxxxxxxxxxxxxx, xfs@xxxxxxxxxxx
In-reply-to: <20070810164752.23117e0e.jlayton@redhat.com>
Mail-followup-to: Christoph Hellwig <hch@xxxxxxxxxxxxx>, Jeff Layton <jlayton@xxxxxxxxxx>, Trond Myklebust <trond.myklebust@xxxxxxxxxx>, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx, v9fs-developer@xxxxxxxxxxxxxxxxxxxxx, zippel@xxxxxxxxxxxxxx, dhowells@xxxxxxxxxx, linux-cifs-client@xxxxxxxxxxxxxxx, codalist@xxxxxxxxxxxxxxxxxxxxxxxx, joel.becker@xxxxxxxxxx, linux-ext4@xxxxxxxxxxxxxxx, fuse-devel@xxxxxxxxxxxxxxxxxxxxx, cluster-devel@xxxxxxxxxx, user-mode-linux-user@xxxxxxxxxxxxxxxxxxxxx, mikulas@xxxxxxxxxxxxxxxxxxxxxxxx, wli@xxxxxxxxxxxxxx, jffs-dev@xxxxxxxx, jfs-discussion@xxxxxxxxxxxxxxxxxxxxx, ocfs2-devel@xxxxxxxxxxxxxx, reiserfs-devel@xxxxxxxxxxxxxxx, bfennema@xxxxxxxxxxxxxxxxxxxxxx, xfs@xxxxxxxxxxx
References: <200708061354.l76Ds3mU002255@dantu.rdu.redhat.com> <20070807171501.e31c4a97.akpm@linux-foundation.org> <1186533934.6625.91.camel@heimdal.trondhjem.org> <20070810164752.23117e0e.jlayton@redhat.com>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.4.2.3i
On Fri, Aug 10, 2007 at 04:47:52PM -0400, Jeff Layton wrote:
> attr->ia_valid after the setattr operation returns. If either ATTR_KILL_*
> bit is set then BUG(). The helper function already clears those bits
> so anything using it should automatically be ok. We'd have to fix
> up NFS and a few others that don't implement suid/sgid.
> 
> This is not as certain as changing the name of the inode operation. It
> would only pop when someone is attempting to change a setuid/setgid
> file on these filesystems. Still, it should conceivably catch most if
> not all offenders. Would that be sufficient to take care of everyone's
> concerns?

I like the idea of checking ia_valid after return a lot.  But instead of
going BUG() it should just do the default action, that we can avoid
touching all the filesystem and only need to change those that need
special care.  I also have plans to add some new AT_ flags for implementing
some filesystem ioctl in generic code that would benefit greatly from
the ia_valid checkin after return to return ENOTTY fr filesystems not
implementing those ioctls.


<Prev in Thread] Current Thread [Next in Thread>