Re: [AppArmor 32/45] Enable LSM hooks to distinguish operations on file descriptors from operations on pathnames

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Andreas Gruenbacher <agruen@...>
Cc: <jjohansen@...>, <akpm@...>, <linux-kernel@...>, <linux-security-module@...>
Date: Friday, October 26, 2007 - 4:58 pm

On Fri, 2007-10-26 at 22:24 +0200, Andreas Gruenbacher wrote:

For special files, f_op->fsetattr will be NULL, since
init_special_inode() will set up i_fop that way.

So the filesystem's fsetattr() will only be called for regular files
and/or directories, depending on how it sets up i_fop.

With the ia_file thing, the filesystem would receive the struct file
pointer in all cases.  So the posted patch would break AFS and FUSE,
because they unconditionally use ia_file if available and don't check
the file type.  They could check the file type, but still the interface
would be ugly.


Ah, so if we kept ATTR_FILE and got rid of iattr_file, would that be OK
for AppArmor? 

Thanks,
Miklos

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [AppArmor 32/45] Enable LSM hooks to distinguish operati..., Andreas Gruenbacher, (Fri Oct 26, 4:24 pm)
Re: [AppArmor 32/45] Enable LSM hooks to distinguish operati..., Miklos Szeredi, (Fri Oct 26, 4:58 pm)
Re: [AppArmor 32/45] Enable LSM hooks to distinguish operati..., Andreas Gruenbacher, (Fri Oct 26, 5:56 pm)