aboutsummaryrefslogtreecommitdiffstats
path: root/security/selinux/hooks.c
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@kernel.org>2007-10-17 02:31:38 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-17 11:43:07 -0400
commitcbfee34520666862f8ff539e580c48958fbb7706 (patch)
treeded5cafce333e908a0fbeda1f7c55eaf7c1fbaaa /security/selinux/hooks.c
parentb53767719b6cd8789392ea3e7e2eb7b8906898f0 (diff)
security/ cleanups
This patch contains the following cleanups that are now possible: - remove the unused security_operations->inode_xattr_getsuffix - remove the no longer used security_operations->unregister_security - remove some no longer required exit code - remove a bunch of no longer used exports Signed-off-by: Adrian Bunk <bunk@kernel.org> Acked-by: James Morris <jmorris@namei.org> Cc: Chris Wright <chrisw@sous-sol.org> Cc: Stephen Smalley <sds@tycho.nsa.gov> Cc: Serge Hallyn <serue@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'security/selinux/hooks.c')
-rw-r--r--security/selinux/hooks.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 221def6a0b1d..24e1b1885de7 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -2409,11 +2409,6 @@ static int selinux_inode_removexattr (struct dentry *dentry, char *name)
2409 return -EACCES; 2409 return -EACCES;
2410} 2410}
2411 2411
2412static const char *selinux_inode_xattr_getsuffix(void)
2413{
2414 return XATTR_SELINUX_SUFFIX;
2415}
2416
2417/* 2412/*
2418 * Copy the in-core inode security context value to the user. If the 2413 * Copy the in-core inode security context value to the user. If the
2419 * getxattr() prior to this succeeded, check to see if we need to 2414 * getxattr() prior to this succeeded, check to see if we need to
@@ -4554,19 +4549,6 @@ static int selinux_register_security (const char *name, struct security_operatio
4554 return 0; 4549 return 0;
4555} 4550}
4556 4551
4557static int selinux_unregister_security (const char *name, struct security_operations *ops)
4558{
4559 if (ops != secondary_ops) {
4560 printk(KERN_ERR "%s: trying to unregister a security module "
4561 "that is not registered.\n", __FUNCTION__);
4562 return -EINVAL;
4563 }
4564
4565 secondary_ops = original_ops;
4566
4567 return 0;
4568}
4569
4570static void selinux_d_instantiate (struct dentry *dentry, struct inode *inode) 4552static void selinux_d_instantiate (struct dentry *dentry, struct inode *inode)
4571{ 4553{
4572 if (inode) 4554 if (inode)
@@ -4844,7 +4826,6 @@ static struct security_operations selinux_ops = {
4844 .inode_getxattr = selinux_inode_getxattr, 4826 .inode_getxattr = selinux_inode_getxattr,
4845 .inode_listxattr = selinux_inode_listxattr, 4827 .inode_listxattr = selinux_inode_listxattr,
4846 .inode_removexattr = selinux_inode_removexattr, 4828 .inode_removexattr = selinux_inode_removexattr,
4847 .inode_xattr_getsuffix = selinux_inode_xattr_getsuffix,
4848 .inode_getsecurity = selinux_inode_getsecurity, 4829 .inode_getsecurity = selinux_inode_getsecurity,
4849 .inode_setsecurity = selinux_inode_setsecurity, 4830 .inode_setsecurity = selinux_inode_setsecurity,
4850 .inode_listsecurity = selinux_inode_listsecurity, 4831 .inode_listsecurity = selinux_inode_listsecurity,
@@ -4914,7 +4895,6 @@ static struct security_operations selinux_ops = {
4914 .sem_semop = selinux_sem_semop, 4895 .sem_semop = selinux_sem_semop,
4915 4896
4916 .register_security = selinux_register_security, 4897 .register_security = selinux_register_security,
4917 .unregister_security = selinux_unregister_security,
4918 4898
4919 .d_instantiate = selinux_d_instantiate, 4899 .d_instantiate = selinux_d_instantiate,
4920 4900