LIDS functionality comes from changes to the standard Linux kernel. Binary LIDS-enabled kernels are not available, so installation requires the patching of kernel source code, then building/compiling and installation of the new kernel.
The definitive documentation of building and installing a Linux kernel is given in The Kernel HOWTO. If you are not familiar with the procedure, you are strongly encouraged to read it!
Question: Do we need the filesystem attributes at install time (when installing the LIDS Tools — for setting the LIDS password) or only when booted into a LIDS kernel?
On a most Unix/Linux filesystems files are uniquely identified by an inode which contains metadata for the file, e.g., ownership and access control information. A standard Unix/Linux permission check uses only information present within the inode.
LIDS makes use of Extended Attributes — xattrs. Not all kernels are compiled with support for xattrs; for LIDS to function correctly your LIDs-enabled kernel must be so compiled (see below).
To obtain xattr functionality on Ext2/3 filesystems necessary for correct LIDS operation, ensure your kernel is compiled with
CONFIG_EXT2_FS=y CONFIG_EXT2_FS_XATTR=y CONFIG_EXT2_FS_POSIX_ACL=y CONFIG_EXT2_FS_SECURITY=y
CONFIG_EXT3_FS=y CONFIG_EXT3_FS_XATTR=y CONFIG_EXT3_FS_POSIX_ACL=y CONFIG_EXT3_FS_SECURITY=yand then mount filesystems with the acl option, i.e., /etc/fstab:
proc /proc proc defaults,acl 0 0 /dev/hda10 / ext3 defaults,acl,errors=remount-ro 0 1 /dev/hda9 /boot ext3 defaults,acl 0 2 /dev/hda14 /scratch ext3 defaults,acl 0 2 /dev/hda13 /tmp ext3 defaults,acl 0 2 /dev/hda11 /usr ext3 defaults,acl 0 2 /dev/hda12 /var ext3 defaults,acl 0 2 /dev/hda3 none swap sw 0 0 /dev/hdc /media/cdrom0 udf,iso9660 ro,user,noauto 0 0 /dev/fd0 /media/floppy0 auto rw,user,noauto 0 0
Hans Reiser has said that there will never be official support for xattr on ReiserFS v3 — though a patch is available — but ReiserFS v4 will support xattr.
XFS supports xattr — to do this efficiently, use an inode size of 512 rather than the standard 256.
The Kconfig (e.g., /usr/local/src/linux-2.6.14/security/lids/Kconfig) which comes with the LIDS kernel patch contains
depends on EXPERIMENTAL && SYSCTL && SECURITY && SECURITY_SECLVL!=y && SECURITY_ROOTPLUG!=y && SECURITY_SELINUX!=y && SECURITY_CAPABILITIES!=ytherefore, in make config|menuconfig|xconfig, choose:
Code maturity level options "Prompt for development and/or..." = yes
General setup "Sysctl support" = yes
Security options "Enable different security models" = yes "Default Linux Capabilities" = no "BSD Secure Levels" = no "NSA SELinux Support" = no
Cryptographic Options "SHA256 digest algorithm" = yesi.e., in .config:
CONFIG_EXPERIMENTAL=y
CONFIG_SYSCTL=y
CONFIG_SECURITY=y # CONFIG_SECURITY_NETWORK is not set # CONFIG_SECURITY_CAPABILITIES is not set # CONFIG_SECURITY_SECLVL is not set # CONFIG_SECURITY_SELINUX is not set
CONFIG_CRYPTO=y CONFIG_CRYPTO_SHA256=y
CONFIG_LIDS=y
CONFIG_LIDS_NO_FLOOD_LOG=y CONFIG_LIDS_ALLOW_SWITCH=y CONFIG_LIDS_ALLOW_LFS=y CONFIG_LIDS_RESTRICT_MODE_SWITCH=y CONFIG_LIDS_MODE_SWITCH_CONSOLE=y CONFIG_LIDS_MODE_SWITCH_SERIAL=y CONFIG_LIDS_MODE_SWITCH_PTY=y
If you are not familiar with the Linux kernel-building procedure, read the HOWTO.
Most (all?) LIDS-related documentation talks about modular kernels. LIDS-patched kernels may be monolithic.
Download a "vanilla" kernel source from www.kernel.org and patch it with the corresponding LIDS patch:
patching file security/lids/include/linux/lidsif.h patching file security/lids/include/linux/lidsext.h patching file security/lids/include/linux/lids.h patching file security/lids/include/linux/lids_sysctl.h patching file security/lids/lids_lsm.c patching file security/lids/lids_acl.c patching file security/lids/lids_cap.c patching file security/lids/lids_init.c patching file security/lids/lids_logs.c patching file security/lids/lids_sysctl.c patching file security/lids/Kconfig patching file security/lids/Makefile patching file security/lids/Makefile.in patching file security/Makefile patching file security/Kconfig patching file Makefile
Next, configure the kernel:
Now build your kernel and if necessary your modules, and install — do not reboot into this new kernel yet.
The final installation step is to build the LIDS Tools. Download and unpack into <DIR>/lidstools-u.v.w, then:
As part of the make install you will be asked for a LIDS password. This is used to make changes to your LIDS configuration and also to start LIDS-free sessions, or to switch off LIDS entirely (or switch it back on). Do not forget this!
The last step before booting your newly-installed LIDS-enabled kernel is to configure your bootloader. It is a good idea to have a couple of choices — here are the Grub entries (for kernels which do not require initrds, e.g., monolithic kernels):
title Vanilla 2.6.14-lids (lids=0) root (hd0,8) kernel /vmlinuz-2.6.14-lids lids=0 root=/dev/hda10
title Vanilla 2.6.14-lids root (hd0,8) kernel /vmlinuz-2.6.14-lids root=/dev/hda10Notice that the first contains the kernel option lids=0: this turns LIDS off completely — this can be used if your configuration gets so messed up you cannot do anything, or you forget your LIDS password.
...previous | up (conts) | next... |