LWN.net Logo

Re: [RFC] [PATCH] [3/6] LSM Stacking: capability LSM stacking support

From:  Serge Hallyn <hallyn@cs.wm.edu>
To:  Chris Wright <chrisw@osdl.org>
Subject:  Re: [RFC] [PATCH] [3/6] LSM Stacking: capability LSM stacking support
Date:  Thu, 04 Nov 2004 17:08:59 -0600
Cc:  Andrew Morton <akpm@osdl.org>, lkml <linux-kernel@vger.kernel.org>

This patch adds stacking support to the POSIX Capability LSM.

Signed-off-by: Serge E. Hallyn <serue@us.ibm.com>

Index: linux-2.6.10-rc1-bk12-stack/security/capability.c
===================================================================
--- linux-2.6.10-rc1-bk12-stack.orig/security/capability.c	2004-11-02
19:55:53.583063616 -0600
+++ linux-2.6.10-rc1-bk12-stack/security/capability.c	2004-11-02
20:10:16.850826968 -0600
@@ -60,6 +60,8 @@
 
 static int __init capability_init (void)
 {
+	int rc;
+
 	if (capability_disable) {
 		printk(KERN_INFO "Capabilities disabled at initialization\n");
 		return 0;
@@ -67,7 +69,8 @@
 	/* register ourselves with the security framework */
 	if (register_security (&capability_ops)) {
 		/* try registering with primary module */
-		if (mod_reg_security (MY_NAME, &capability_ops)) {
+		rc = mod_reg_security (MY_NAME, &capability_ops);
+		if (rc < 0) {
 			printk (KERN_INFO "Failure registering capabilities "
 				"with primary security module.\n");
 			return -EINVAL;


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Copyright © 2004, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds
Powered by Rackspace Managed Hosting.