Xie has included instructions on how to patch the kernel in the LIDS download. However, I will briefly cover the necessary steps. This example assumes your kernel sources are installed in /usr/src/linux.
$ tar zxvf lids-<lids_version>-<kernel_version>.tar.gz
$ cd /usr/src/linux $ patch -p1 < /path/to/lids/patch/lids-<lids_version>-<kernel_version>.patch
There are several kernel configuration options for LIDS. In order for LIDS to work, you must make sure the following options are enabled:
[*] Prompt for development and/or incomplete code/drivers [*] Sysctl Support
The source for the lidsadm utility is located in the directory containing your LIDS source and is called:
lidsadm-<lids_version>
(NOTE: If you are upgrading lidsadm, you should backup everything in the /etc/lids directory first!)
To compile and install lidsadm, simply:
$ make $ su - # make install
from the lidsadm source directory. This will install lidsadm in the /sbin directory. It will also create an /etc/lids directory and place a few default configuration files in it for you.
If you wish to use the view option with lidsadm, replace the
$ make
with
$ make VIEW=1
Before you reboot into your LIDS enhanced kernel, you should configure your LIDS ACLs first. Otherwise your system may be unusable when you reboot. Configuring LIDS ACLs is covered later.
This happens on systems where /usr/include/linux
is not a symbolic link to /usr/src/linux/include/linux
. The complete error message is:
lidsadm.c:30: linux/lidsext.h: No such file or directory make: *** [lidsadm.o] Error 1
To fix this problem, edit the Makefile in the lidsadm source directory and add -I/usr/src/linux/include
to the CFLAGS option.
At this point, you should be able to compile lidsadm normally.
The format of the /etc/lids/lids.conf
file changed in these releases. You need to recreate the file using the new version of lidsadm.