mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
[PATCH] Remove security_inode_post_create/mkdir/symlink/mknod hooks
This patch removes the inode_post_create/mkdir/mknod/symlink LSM hooks as they are obsoleted by the new inode_init_security hook that enables atomic inode security labeling. If anyone sees any reason to retain these hooks, please speak now. Also, is anyone using the post_rename/link hooks; if not, those could also be removed. Signed-off-by: Stephen Smalley <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
570bc1c2e5
commit
a74574aafe
5 changed files with 4 additions and 242 deletions
|
|
@ -270,12 +270,6 @@ static int dummy_inode_create (struct inode *inode, struct dentry *dentry,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void dummy_inode_post_create (struct inode *inode, struct dentry *dentry,
|
||||
int mask)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
static int dummy_inode_link (struct dentry *old_dentry, struct inode *inode,
|
||||
struct dentry *new_dentry)
|
||||
{
|
||||
|
|
@ -300,24 +294,12 @@ static int dummy_inode_symlink (struct inode *inode, struct dentry *dentry,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void dummy_inode_post_symlink (struct inode *inode,
|
||||
struct dentry *dentry, const char *name)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
static int dummy_inode_mkdir (struct inode *inode, struct dentry *dentry,
|
||||
int mask)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void dummy_inode_post_mkdir (struct inode *inode, struct dentry *dentry,
|
||||
int mask)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
static int dummy_inode_rmdir (struct inode *inode, struct dentry *dentry)
|
||||
{
|
||||
return 0;
|
||||
|
|
@ -329,12 +311,6 @@ static int dummy_inode_mknod (struct inode *inode, struct dentry *dentry,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void dummy_inode_post_mknod (struct inode *inode, struct dentry *dentry,
|
||||
int mode, dev_t dev)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
static int dummy_inode_rename (struct inode *old_inode,
|
||||
struct dentry *old_dentry,
|
||||
struct inode *new_inode,
|
||||
|
|
@ -894,17 +870,13 @@ void security_fixup_ops (struct security_operations *ops)
|
|||
set_to_dummy_if_null(ops, inode_free_security);
|
||||
set_to_dummy_if_null(ops, inode_init_security);
|
||||
set_to_dummy_if_null(ops, inode_create);
|
||||
set_to_dummy_if_null(ops, inode_post_create);
|
||||
set_to_dummy_if_null(ops, inode_link);
|
||||
set_to_dummy_if_null(ops, inode_post_link);
|
||||
set_to_dummy_if_null(ops, inode_unlink);
|
||||
set_to_dummy_if_null(ops, inode_symlink);
|
||||
set_to_dummy_if_null(ops, inode_post_symlink);
|
||||
set_to_dummy_if_null(ops, inode_mkdir);
|
||||
set_to_dummy_if_null(ops, inode_post_mkdir);
|
||||
set_to_dummy_if_null(ops, inode_rmdir);
|
||||
set_to_dummy_if_null(ops, inode_mknod);
|
||||
set_to_dummy_if_null(ops, inode_post_mknod);
|
||||
set_to_dummy_if_null(ops, inode_rename);
|
||||
set_to_dummy_if_null(ops, inode_post_rename);
|
||||
set_to_dummy_if_null(ops, inode_readlink);
|
||||
|
|
|
|||
Loading…
Reference in a new issue