Subject: Re: lkm problems...
To: None <email@example.com>
From: Roland McGrath <firstname.lastname@example.org>
Date: 11/22/1995 11:55:58
Here is defeat-securelevel.c; it has been over a year and a half since
I compiled this, so it might need a little tweaking. When you unload
the module, it resets the securelevel to 0 (singleuser); you can then
change it with sysctl (I think).
/* Trivial loadable kernel module to defeat the "kernel security level".
Written 21 Jun 94 by Roland McGrath.
The author places this file in the public domain.
The module can only be loaded at security level 0 (single user,
/etc/rc); it does nothing but set the security level to -1. It can
be unloaded at any time, which will reset the level to 0 if it is
cc -I/sys -c defeat-securelevel.c
I use the following in /etc/rc.local to load this:
if [ -r /etc/defeat-securelevel.o ]; then
# Disable annoying "security".
modload -e insecure -o /etc/defeat-securelevel /etc/defeat-securelevel.o
module_handle (struct lkm_table *lkmtp, int cmd)
struct lkm_misc *args = lkmtp->private.lkm_misc;
if (lkmexists (lkmtp))
if (securelevel > 0)
securelevel = -1;
if (securelevel < 0)
securelevel = 0;
insecure (struct lkm_table *lkmtp,