8.24. Libcap-2.42

#### Linux From Scratch - Version 10.0-rc1

### Chapter 8. Installing Basic System Software

- Prev

  Acl-2.2.53

- Next

  Shadow-4.8.1

- Up
- Home

# 8.24. Libcap-2.42

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: 11 MB

## 8.24.1. Installation of Libcap

Prevent a static library from being installed:

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

Compile the package:

    make lib=lib

The meaning of the make option:

`lib=lib`

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

To test the results, issue:

    make test

Install the package and do some cleanup:

    make lib=lib PKGCONFIGDIR=/usr/lib/pkgconfig install
    chmod -v 755 /lib/libcap.so.2.42
    mv -v /lib/libpsx.a /usr/lib
    rm -v /lib/libcap.so
    ln -sfv ../../lib/libcap.so.2 /usr/lib/libcap.so

## 8.24.2. Contents of Libcap

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

### Short Descriptions

capsh | A shell wrapper to explore and constrain capability support
getcap | Examines file capabilities
getpcaps | Displays the capabilities on the queried process(es)
setcap | Sets file capabilities
`libcap` | Contains the library functions for manipulating POSIX 1003.1e capabilities
`libpsx` | Contains functions to support POSIX semantics for syscalls associated with the pthread library

- Prev

  Acl-2.2.53

- Next

  Shadow-4.8.1

- Up
- Home