Re: [PATCH 00/25] move handling of setuid/gid bits from VFS into individual setattr functions (RESEND)
Christoph Hellwig <[email protected]> Sat, 11 Aug 2007 03:57:39 +0100
| Newsgroups | gmane.linux.cluster.redhat.cluster.devel,gmane.comp.file-systems.ext4,gmane.linux.file-systems.cifs,gmane.comp.file-systems.fuse.devel,gmane.comp.file-systems.reiserfs.general,gmane.linux.uml.user,gmane.comp.file-systems.coda.general,gmane.linux.kernel,gmane.linux.file-systems.jffs,gmane.linux.file-systems,gmane.comp.file-systems.ocfs2.devel |
|---|---|
| Message-ID | <[email protected]> |
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.