[PATCH 10/10] lowmem: Remove the possibility to stack the module

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

 



The mod_reg_security() function that is used to stack modules has been removed:
"LSMs wishing to stack capability as a secondary module should do so
explicitly". Thus, let's remove the possibility to stack in the init function.
The functionality could probably be reintroduced later if somebody has time to
implement it.

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

diff --git a/security/lowmem.c b/security/lowmem.c
index b986070..ae78a53 100644
--- a/security/lowmem.c
+++ b/security/lowmem.c
@@ -340,8 +340,6 @@ static struct security_operations lowmem_security_ops = {
 };
 
 static struct ctl_table_header *lowmem_table_header;
-/* flag to keep track of how we were registered */
-static int secondary;
 
 static struct attribute *lowmem_attrs[] = {
 	&low_watermark_attr.attr,
@@ -360,13 +358,7 @@ static int __init lowmem_init(void)
 	/* register ourselves with the security framework */
 	if (register_security(&lowmem_security_ops)) {
 		printk(KERN_ERR MY_NAME ": Failure registering with the kernel\n");
-		/* try registering with primary module */
-		if (mod_reg_security(MY_NAME, &lowmem_security_ops)) {
-			printk(KERN_ERR ": Failure registering with the primary"
-			       "security module.\n");
-			return -EINVAL;
-		}
-		secondary = 1;
+		return -EINVAL;
 	}
 
 	/* initialize the uids vector */
-- 
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