8.24. Libcap-2.65

The Libcap package implements the user-space interfaces to the POSIX 1003.1e capabilities available in Linux kernels. These capabilities are a partitioning of the all powerful root privilege into a set of distinct privileges.

Approximate build time: less than 0.1 SBU
Required disk space: 2.7 MB

8.24.1. Installation of Libcap

Prevent static libraries from being installed:

sed -i '/install -m.*STA/d' libcap/Makefile

Compile the package:

make prefix=/usr lib=lib

The meaning of the make option:


This parameter sets the library directory to /usr/lib rather than /usr/lib64 on x86_64. It has no effect on x86.

To test the results, issue:

make test

Install the package:

make prefix=/usr lib=lib install

8.24.2. Contents of Libcap

Installed programs: capsh, getcap, getpcaps, and setcap
Installed library: libcap.so and libpsx.so

Short Descriptions


A shell wrapper to explore and constrain capability support


Examines file capabilities


Displays the capabilities on the queried process(es)


Sets file capabilities


Contains the library functions for manipulating POSIX 1003.1e capabilities


Contains functions to support POSIX semantics for syscalls associated with the pthread library