Commit c82a77d7 authored by Chris Wright's avatar Chris Wright Committed by Linus Torvalds

[PATCH] lsm: Remove inode_permission_lite hook (3/4)

parent 35190709
......@@ -325,7 +325,7 @@ static inline int exec_permission_lite(struct inode *inode)
return -EACCES;
ok:
return security_inode_permission_lite(inode, MAY_EXEC);
return security_inode_permission(inode, MAY_EXEC);
}
/*
......
......@@ -327,16 +327,6 @@ struct swap_info_struct;
* @inode contains the inode structure to check.
* @mask contains the permission mask.
* Return 0 if permission is granted.
* @inode_permission_lite:
* Check permission before accessing an inode. This hook is
* currently only called when checking MAY_EXEC access during
* pathname resolution. The dcache lock is held and thus modules
* that could sleep or contend the lock should return -EAGAIN to
* inform the kernel to drop the lock and try again calling the
* full permission hook.
* @inode contains the inode structure to check.
* @mask contains the permission mask.
* Return 0 if permission is granted.
* @inode_setattr:
* Check permission before setting file attributes. Note that the kernel
* call to notify_change is performed from several locations, whenever
......@@ -1052,7 +1042,6 @@ struct security_operations {
int (*inode_readlink) (struct dentry *dentry);
int (*inode_follow_link) (struct dentry *dentry, struct nameidata *nd);
int (*inode_permission) (struct inode *inode, int mask);
int (*inode_permission_lite) (struct inode *inode, int mask);
int (*inode_setattr) (struct dentry *dentry, struct iattr *attr);
int (*inode_getattr) (struct vfsmount *mnt, struct dentry *dentry);
void (*inode_delete) (struct inode *inode);
......@@ -1465,12 +1454,6 @@ static inline int security_inode_permission (struct inode *inode, int mask)
return security_ops->inode_permission (inode, mask);
}
static inline int security_inode_permission_lite (struct inode *inode,
int mask)
{
return security_ops->inode_permission_lite (inode, mask);
}
static inline int security_inode_setattr (struct dentry *dentry,
struct iattr *attr)
{
......@@ -2097,12 +2080,6 @@ static inline int security_inode_permission (struct inode *inode, int mask)
return 0;
}
static inline int security_inode_permission_lite (struct inode *inode,
int mask)
{
return 0;
}
static inline int security_inode_setattr (struct dentry *dentry,
struct iattr *attr)
{
......
......@@ -308,11 +308,6 @@ static int dummy_inode_permission (struct inode *inode, int mask)
return 0;
}
static int dummy_inode_permission_lite (struct inode *inode, int mask)
{
return 0;
}
static int dummy_inode_setattr (struct dentry *dentry, struct iattr *iattr)
{
return 0;
......@@ -826,7 +821,6 @@ void security_fixup_ops (struct security_operations *ops)
set_to_dummy_if_null(ops, inode_readlink);
set_to_dummy_if_null(ops, inode_follow_link);
set_to_dummy_if_null(ops, inode_permission);
set_to_dummy_if_null(ops, inode_permission_lite);
set_to_dummy_if_null(ops, inode_setattr);
set_to_dummy_if_null(ops, inode_getattr);
set_to_dummy_if_null(ops, inode_delete);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment