From: serue@us.ibm.com
To: lkml <linux-kernel@vger.kernel.org>
Cc: Chris Wright <chrisw@osdl.org>,
Stephen Smalley <sds@epoch.ncsc.mil>,
James Morris <jmorris@redhat.com>
Subject: [patch 1/11] lsm stacking: don't default to dummy_##hook
Date: Wed, 8 Jun 2005 18:56:42 -0500 [thread overview]
Message-ID: <20050608235642.GA27314@serge.austin.ibm.com> (raw)
In-Reply-To: <20050608235505.GA27298@serge.austin.ibm.com>
When stacking multiple LSMs, we do not want hooks which are undefined to
be substituted with the dummy_##hook.
Signed-off-by: Serge Hallyn <serue@us.ibm.com>
---
security/security.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
Index: linux-2.6.12-rc6/security/security.c
===================================================================
--- linux-2.6.12-rc6.orig/security/security.c
+++ linux-2.6.12-rc6/security/security.c
@@ -81,15 +81,15 @@ int __init security_init(void)
*/
int register_security(struct security_operations *ops)
{
+ if (security_ops != &dummy_security_ops)
+ return -EAGAIN;
+
if (verify(ops)) {
printk(KERN_DEBUG "%s could not verify "
"security_operations structure.\n", __FUNCTION__);
return -EINVAL;
}
- if (security_ops != &dummy_security_ops)
- return -EAGAIN;
-
security_ops = ops;
return 0;
@@ -134,9 +134,9 @@ int unregister_security(struct security_
*/
int mod_reg_security(const char *name, struct security_operations *ops)
{
- if (verify(ops)) {
- printk(KERN_INFO "%s could not verify "
- "security operations.\n", __FUNCTION__);
+ if (!ops) {
+ printk(KERN_INFO "%s received NULL security operations",
+ __FUNCTION__);
return -EINVAL;
}
next prev parent reply other threads:[~2005-06-08 23:52 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-08 23:55 patch 0/11] lsm stacking: intro serue
2005-06-08 23:56 ` serue [this message]
2005-06-08 23:57 ` [patch 2/11] lsm stacking: replace void* security with hlist serue
2005-06-08 23:58 ` [patch 3/11] lsm stacking: introduce security_*_value API serue
2005-06-08 23:59 ` [patch 4/11] lsm stacking: stacker documentation serue
2005-06-09 0:00 ` [patch 5/11] lsm stacking: actual stacker module serue
2005-06-09 0:00 ` [patch 6/11] lsm stacking: introduce stackable capabilities lsm serue
2005-06-09 0:01 ` [patch 7/11] lsm stacking: selinux: update ->security structs serue
2005-06-09 0:02 ` [patch 8/11] lsm stacking: selinux: use security_*_value API serue
2005-06-09 0:02 ` [patch 9/11] lsm stacking: selinux: remove secondary support serue
2005-06-09 0:03 ` [patch 10/11] lsm stacking: hook completeness verification serue
2005-06-09 0:04 ` [patch 11/11] lsm stacking: support sharing /proc/$$/attr/* serue
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=20050608235642.GA27314@serge.austin.ibm.com \
--to=serue@us.ibm.com \
--cc=chrisw@osdl.org \
--cc=jmorris@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sds@epoch.ncsc.mil \
/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®