Section 25.4. Objective 4: Customizing a Kernel


25.4. Objective 4: Customizing a Kernel

You can apply oodles of different customizations to your kernel. The simplest customization is, of course, to just tweak options in one of the configuration interfaces. Beyond the ordinary kernel maintenance patches, there are many third-party patches. Some of these are written by the main kernel hackers and some by others around the world. Some of the most popular patches relate to performance and security enhancements. Here, we'll discuss the Access Control List (ACL) patches as an advanced example.

If you need very detailed access permissions on files and/or directories, the ACL patches may meet your requirements. There are patches for this at http://acl.bestbits.at. This site documents a number of different things that you need to sort through and relate to. Select which patches you need, find out which user space packages or patches you need to support the extensions, and download the needed files.


ea-version.diff.gz

Patch for extended attributes


acl-version.diff.gz

Patch for access control lists

The ACL patch is a bit more far-reaching that your ordinary kernel patch. For ACLs to work properly, all filesystem utilities such as cp and mv, and a whole lot of other commands need to know about ACLs and be able to manipulate them as well as the files. We will not go into that in this book, but briefly, the process combines software compilation (discussed in Chapter 4) and patching as illustrated earlier.

In an environment that requires high uptimes, your smartest move may be to test patches on noncritical machines for quite some time before you apply them to critical equipment. You should also be careful about how much you mix and match patches and kernels. The procedure is as follows:

  1. Apply the patches:

     # cd /usr/src/linux # zcat ea-"version".diff.gz | patch -p1 # zcat acl-"version".diff.gz | patch -p1 

  2. Edit your .config file to look like this:

     CONFIG_FS_POSIX_ACL=y CONFIG_EXT3_FS_XATTR=y CONFIG_EXT3_FS_XATTR_SHARING=y CONFIG_EXT3_FS_XATTR_USER=y CONFIG_EXT3_FS_POSIX_ACL=y CONFIG_EXT2_FS_XATTR=y CONFIG_EXT2_FS_XATTR_SHARING=y CONFIG_EXT2_FS_XATTR_USER=y CONFIG_EXT2_FS_POSIX_ACL=y 

    Alternatively, use make config or one of its alternatives to set up the kernel.

  3. Proceed with kernel compilation and installation.

After a reboot, the system will be ready to deal with extended file attributes and access control lists.



LPI Linux Certification in a Nutshell
LPI Linux Certification in a Nutshell (In a Nutshell (OReilly))
ISBN: 0596005288
EAN: 2147483647
Year: 2004
Pages: 257

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net