[PATCH 07/10] lowmem: Security modules can no longer be removed.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The unregister_security() and mod_unreg_security() functions were removed
because the upstream developers believe that it should not be possible to remove
security modules, "It is used only by out-of-tree modules, which are often
binary-only, illegal, abusive of the API and dangerous, e.g.  silently
re-vectoring SELinux."

Signed-off-by: Viktor Rosendahl <viktor.rosendahl@xxxxxxxxx>
---
 security/lowmem.c |   22 ----------------------
 1 files changed, 0 insertions(+), 22 deletions(-)

diff --git a/security/lowmem.c b/security/lowmem.c
index 939901c..87f6cec 100644
--- a/security/lowmem.c
+++ b/security/lowmem.c
@@ -291,29 +291,7 @@ static int __init lowmem_init(void)
 	return 0;
 }
 
-static void __exit lowmem_exit(void)
-{
-	/* remove ourselves from the security framework */
-	if (secondary) {
-		if (mod_unreg_security(MY_NAME, &lowmem_security_ops))
-			printk(KERN_ERR MY_NAME ": Failure unregistering "
-			       "with the primary security module.\n");
-	} else {
-		if (unregister_security(&lowmem_security_ops)) {
-			printk(KERN_ERR MY_NAME ": Failure unregistering "
-			       "with the kernel.\n");
-		}
-	}
-
-	unregister_sysctl_table(lowmem_table_header);
-
-	sysfs_remove_group(kernel_kobj, &lowmem_attr_group);
-
-	printk(KERN_INFO MY_NAME ": Module removed.\n");
-}
-
 module_init(lowmem_init);
-module_exit(lowmem_exit);
 
 MODULE_DESCRIPTION("Low watermark LSM module");
 MODULE_LICENSE("GPL");
-- 
1.5.6.3

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux