summaryrefslogtreecommitdiffstats
path: root/security/security.c
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@kernel.org>2007-10-16 23:31:38 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-17 08:43:07 -0700
commitcbfee34520666862f8ff539e580c48958fbb7706 (patch)
treeded5cafce333e908a0fbeda1f7c55eaf7c1fbaaa /security/security.c
parentb53767719b6cd8789392ea3e7e2eb7b8906898f0 (diff)
downloadlinux-stable-cbfee34520666862f8ff539e580c48958fbb7706.tar.gz
linux-stable-cbfee34520666862f8ff539e580c48958fbb7706.tar.bz2
linux-stable-cbfee34520666862f8ff539e580c48958fbb7706.zip
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/security.c')
-rw-r--r--security/security.c58
1 files changed, 1 insertions, 57 deletions
diff --git a/security/security.c b/security/security.c
index 2e1b35dd2550..0e1f1f124368 100644
--- a/security/security.c
+++ b/security/security.c
@@ -71,8 +71,7 @@ int __init security_init(void)
*
* This function is to allow a security module to register itself with the
* kernel security subsystem. Some rudimentary checking is done on the @ops
- * value passed to this function. A call to unregister_security() should be
- * done to remove this security_options structure from the kernel.
+ * value passed to this function.
*
* If there is already a security module registered with the kernel,
* an error will be returned. Otherwise 0 is returned on success.
@@ -94,31 +93,6 @@ int register_security(struct security_operations *ops)
}
/**
- * unregister_security - unregisters a security framework with the kernel
- * @ops: a pointer to the struct security_options that is to be registered
- *
- * This function removes a struct security_operations variable that had
- * previously been registered with a successful call to register_security().
- *
- * If @ops does not match the valued previously passed to register_security()
- * an error is returned. Otherwise the default security options is set to the
- * the dummy_security_ops structure, and 0 is returned.
- */
-int unregister_security(struct security_operations *ops)
-{
- if (ops != security_ops) {
- printk(KERN_INFO "%s: trying to unregister "
- "a security_opts structure that is not "
- "registered, failing.\n", __FUNCTION__);
- return -EINVAL;
- }
-
- security_ops = &dummy_security_ops;
-
- return 0;
-}
-
-/**
* mod_reg_security - allows security modules to be "stacked"
* @name: a pointer to a string with the name of the security_options to be registered
* @ops: a pointer to the struct security_options that is to be registered
@@ -147,30 +121,6 @@ int mod_reg_security(const char *name, struct security_operations *ops)
return security_ops->register_security(name, ops);
}
-/**
- * mod_unreg_security - allows a security module registered with mod_reg_security() to be unloaded
- * @name: a pointer to a string with the name of the security_options to be removed
- * @ops: a pointer to the struct security_options that is to be removed
- *
- * This function allows security modules that have been successfully registered
- * with a call to mod_reg_security() to be unloaded from the system.
- * This calls the currently loaded security module's unregister_security() call
- * with the @name and @ops variables.
- *
- * The return value depends on the currently loaded security module, with 0 as
- * success.
- */
-int mod_unreg_security(const char *name, struct security_operations *ops)
-{
- if (ops == security_ops) {
- printk(KERN_INFO "%s invalid attempt to unregister "
- " primary security ops.\n", __FUNCTION__);
- return -EINVAL;
- }
-
- return security_ops->unregister_security(name, ops);
-}
-
/* Security operations */
int security_ptrace(struct task_struct *parent, struct task_struct *child)
@@ -528,11 +478,6 @@ int security_inode_killpriv(struct dentry *dentry)
return security_ops->inode_killpriv(dentry);
}
-const char *security_inode_xattr_getsuffix(void)
-{
- return security_ops->inode_xattr_getsuffix();
-}
-
int security_inode_getsecurity(const struct inode *inode, const char *name, void *buffer, size_t size, int err)
{
if (unlikely(IS_PRIVATE(inode)))
@@ -858,7 +803,6 @@ int security_netlink_send(struct sock *sk, struct sk_buff *skb)
{
return security_ops->netlink_send(sk, skb);
}
-EXPORT_SYMBOL(security_netlink_send);
int security_netlink_recv(struct sk_buff *skb, int cap)
{