mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] slim: handle failure to register
@ 2006-09-20 16:48 Kylene Jo Hall
  0 siblings, 0 replies; only message in thread
From: Kylene Jo Hall @ 2006-09-20 16:48 UTC (permalink / raw)
  To: linux-kernel; +Cc: akpm, Serge Hallyn, Mimi Zohar, Dave Safford, sds

Thanks to Stephen Smalley for pointing out that we need to securely
handle a failure to register with the LSM security hooks.  This patch
adds a panic in the event that the module is unable to register.

Signed-off-by: Kylene Hall <kjhall@us.ibm.com>
Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
---
security/slim/slm_main.c |    6 +++++-
1 files changed, 5 insertions(+), 1 deletion(-) 
--- linux-2.6.18-rc6-orig/security/slim/slm_main.c	2006-09-18 16:41:51.000000000 -0500
+++ linux-2.6.18-rc6/security/slim/slm_main.c	2006-09-19 12:48:42.000000000 -0500
@@ -1644,9 +1644,13 @@ int slim_enabled = 1;
 #endif
 static int __init init_slm(void)
 {
+	int rc;
 	if (!slim_enabled)
 		return 0;
 	slm_task_init_alloc_security(current);
-	return register_security(&slm_security_ops);
+	rc = register_security(&slm_security_ops);
+	if (rc != 0)
+		panic("SLIM: Unable to register with kernel\n");
+	return rc;
 }
 security_initcall(init_slm);



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-09-20 16:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-20 16:48 [PATCH] slim: handle failure to register Kylene Jo Hall

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®