Seriously, about inode_post_removexattr

From: Hawk Xu (h.xu@private)
Date: Fri Nov 25 2005 - 00:45:43 PST


Hi!

I really think that we should have an inode_post_removexattr, otherwise 
we have no method to update the in-core i_security after removing xattr 
of an inode, assume that the infomation pointed by i_security is related 
to the xattr.

There are two solutions:

1. We could move inode_post_setxattr hook call to a deeper place where 
both setxattr and removexattr syscalls will reach, e.g.  in both 
generic_setxattr() and generic_removexattr(), just before 
`handler->set(...)'. But this is not recommended because 
inode->i_op->setxattr may not point to generic_setxattr, and 
inode->i_op->removexattr may not point to generic_removexattr.

2. Add an inode_post_removexattr hook to the LSM framework. The hook is 
called by removexattr() function in fs/xattr.c, after successful 
removexattr operation. See the patch in the attachment. The patch is 
against 2.6.14.3.


Any idea?

Thanks!

-- 
Best regards,

Hawk Xu, M.S.C.S.
h.xu `echo "ta"|rev` 163 `echo "tod"|rev` com






This archive was generated by hypermail 2.1.3 : Fri Nov 25 2005 - 00:46:54 PST