diff options
author | Andrew Morton <akpm@digeo.com> | 2003-05-07 08:20:52 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@home.transmeta.com> | 2003-05-07 08:20:52 -0700 |
commit | 667b93eb42f7b7d81f70af0aa63cb5b19e1dccac (patch) | |
tree | 3091939d5b7dd48be82389a2f4eb465bce4ed042 /security | |
parent | 16685211ee82cd8ec22cd1b2e72de6303f4bc6c0 (diff) | |
download | history-667b93eb42f7b7d81f70af0aa63cb5b19e1dccac.tar.gz |
[PATCH] Change LSM hooks in setxattr
From: Stephen Smalley <sds@epoch.ncsc.mil>
This patch against 2.5.69 adds a security_inode_post_setxattr hook so that
security modules can update the inode security structure after a successful
setxattr, and it moves the existing security_inode_setxattr hook call after
the taking the inode semaphore so that atomicity is provided for the
security check and the update to the inode security structure.
Diffstat (limited to 'security')
-rw-r--r-- | security/dummy.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/security/dummy.c b/security/dummy.c index 062ae9a7fa2b95..d12442182a94a4 100644 --- a/security/dummy.c +++ b/security/dummy.c @@ -334,6 +334,11 @@ static int dummy_inode_setxattr (struct dentry *dentry, char *name, void *value, return 0; } +static void dummy_inode_post_setxattr (struct dentry *dentry, char *name, void *value, + size_t size, int flags) +{ +} + static int dummy_inode_getxattr (struct dentry *dentry, char *name) { return 0; @@ -803,6 +808,7 @@ void security_fixup_ops (struct security_operations *ops) set_to_dummy_if_null(ops, inode_getattr); set_to_dummy_if_null(ops, inode_delete); set_to_dummy_if_null(ops, inode_setxattr); + set_to_dummy_if_null(ops, inode_post_setxattr); set_to_dummy_if_null(ops, inode_getxattr); set_to_dummy_if_null(ops, inode_listxattr); set_to_dummy_if_null(ops, inode_removexattr); |