[patch 8/7] BSD Secure Levels: unregister on sysfs failure

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

 



As a feeble ode to Douglas Adams, this is the 8th in a series of 7
patches.  It fixes the issue where the security ops were not being
released on sysfs registration failure.

Signed off by: Michael Halcrow <[email protected]>

Index: linux-2.6.12-rc4-mm2-seclvl/security/seclvl.c
===================================================================
--- linux-2.6.12-rc4-mm2-seclvl.orig/security/seclvl.c	2005-05-20 09:09:42.000000000 -0500
+++ linux-2.6.12-rc4-mm2-seclvl/security/seclvl.c	2005-05-20 09:09:46.000000000 -0500
@@ -766,6 +766,7 @@
 	} /* if we registered ourselves with the security framework */
 	if ((rc = do_sysfs_registrations())) {
 		seclvl_printk(0, KERN_ERR, "Error registering with sysfs\n");
+		unregister_security(&seclvl_ops);
 		goto exit;
 	}
 	seclvl_printk(0, KERN_INFO, "seclvl: Successfully initialized.\n");
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux