lkml.org 
[lkml]   [2007]   [Oct]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [AppArmor 32/45] Enable LSM hooks to distinguish operations on file descriptors from operations on pathnames
Date
On Friday 26 October 2007 22:58:11 Miklos Szeredi 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.

Ah okay, that's what you mean. That's much cleaner than ia_file indeed.

> They could check the file type, but still the interface would be ugly.

Agreed, that would be ugly.

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

No problem, yes.

Thanks,
Andreas
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-10-27 00:09    [W:0.104 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site