From: Chris Wright <chrisw@osdl.org>
To: akpm@osdl.org, torvalds@osdl.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 2/3] minor cleanups in capability.c
Date: Tue, 11 May 2004 16:50:00 -0700 [thread overview]
Message-ID: <20040511165000.P21045@build.pdx.osdl.net> (raw)
In-Reply-To: <20040511164640.O21045@build.pdx.osdl.net>; from chrisw@osdl.org on Tue, May 11, 2004 at 04:46:40PM -0700
Remove confusing error message when loading as secondary module, and
ditch conditional MY_NAME macro.
--- linus-2.5/security/capability.c~verbose 2004-05-11 15:44:11.651038464 -0700
+++ linus-2.5/security/capability.c 2004-05-11 16:02:25.144802144 -0700
@@ -47,11 +47,7 @@
.vm_enough_memory = cap_vm_enough_memory,
};
-#if defined(CONFIG_SECURITY_CAPABILITIES_MODULE)
-#define MY_NAME THIS_MODULE->name
-#else
-#define MY_NAME "capability"
-#endif
+#define MY_NAME __stringify(KBUILD_MODNAME)
/* flag to keep track of how we were registered */
static int secondary;
@@ -61,8 +57,6 @@
{
/* register ourselves with the security framework */
if (register_security (&capability_ops)) {
- printk (KERN_INFO
- "Failure registering capabilities with the kernel\n");
/* try registering with primary module */
if (mod_reg_security (MY_NAME, &capability_ops)) {
printk (KERN_INFO "Failure registering capabilities "
@@ -71,7 +65,8 @@
}
secondary = 1;
}
- printk (KERN_INFO "Capability LSM initialized\n");
+ printk (KERN_INFO "Capability LSM initialized%s\n",
+ secondary ? " as secondary" : "");
return 0;
}
next prev parent reply other threads:[~2004-05-11 23:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-11 23:46 [PATCH 1/3] remove empty build of capability.o Chris Wright
2004-05-11 23:50 ` Chris Wright [this message]
2004-05-11 23:56 ` [PATCH 3/3] add disable param to capabilities module Chris Wright
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040511165000.P21045@build.pdx.osdl.net \
--to=chrisw@osdl.org \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®