Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wright <chris@wirex.com>2003-06-13 04:27:14 -0700
committerLinus Torvalds <torvalds@home.transmeta.com>2003-06-13 04:27:14 -0700
commitc82a77d7bb51beffe0dae87803e4491c48796f60 (patch)
tree703a20a920ea7661a535ec615ca3a30d68a8f188
parent351907094f893dd931fa87785321ded97235e6b8 (diff)
[PATCH] lsm: Remove inode_permission_lite hook (3/4)
-rw-r--r--fs/namei.c2
-rw-r--r--include/linux/security.h23
-rw-r--r--security/dummy.c6
3 files changed, 1 insertions, 30 deletions
diff --git a/fs/namei.c b/fs/namei.c
index a9384f6fe8ea..28feeb2366c4 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -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);
}
/*
diff --git a/include/linux/security.h b/include/linux/security.h
index febbf577a676..62b1639bd3aa 100644
--- a/include/linux/security.h
+++ b/include/linux/security.h
@@ -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)
{
diff --git a/security/dummy.c b/security/dummy.c
index 5873fef1ae4c..18de8edb32c8 100644
--- a/security/dummy.c
+++ b/security/dummy.c
@@ -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);