The libcap package was installed in LFS, but if PAM support is desired, it needs to be reinstalled after PAM is built.
This package is known to build and work properly using an LFS-7.9 platform.
Download (HTTP): https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-2.25.tar.xz
Download (FTP): ftp://ftp.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-2.25.tar.xz
Download MD5 sum: 6666b839e5d46c2ad33fc8aa2ceb5f77
Download size: 64 KB
Estimated disk space required: 1.7 MB
Estimated build time: less than 0.1 SBU
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/libcap
Install libcap by running the following commands:
sed -i 's:LIBDIR:PAM_&:g' pam_cap/Makefile && make
This package does not come with a test suite.
If you want to disable installing the static library, use this sed:
sed -i '/install.*STALIBNAME/ s/^/#/' libcap/Makefile
Now, as the root
user:
make prefix=/usr \ SBINDIR=/sbin \ PAM_LIBDIR=/lib \ RAISE_SETFCAP=no install
Still as the root
user, clean up
some library locations and permissions:
chmod -v 755 /usr/lib/libcap.so && mv -v /usr/lib/libcap.so.* /lib && ln -sfv ../../lib/libcap.so.2 /usr/lib/libcap.so
sed -i '...',
PAM_LIBDIR=/lib
: These
correct PAM module install location.
RAISE_SETFCAP=no
: This
parameter skips trying to use setcap on itself. This avoids an installation
error if the kernel or file system do not support extended
capabilities.
Last updated on 2016-02-21 15:08:48 -0800