[e79ed72] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
| 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
| 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
[c542fdec] | 7 | <!ENTITY libcap-download-http "https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-&libcap-version;.tar.xz">
|
---|
| 8 | <!ENTITY libcap-download-ftp "ftp://ftp.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-&libcap-version;.tar.xz">
|
---|
| 9 | <!ENTITY libcap-md5sum "09a185e4b0aa8a81a51c1e4d0eba7db0">
|
---|
| 10 | <!ENTITY libcap-size "57 KB">
|
---|
| 11 | <!ENTITY libcap-buildsize "1.5 MB">
|
---|
| 12 | <!ENTITY libcap-time "0.1 SBU">
|
---|
[e79ed72] | 13 | ]>
|
---|
| 14 |
|
---|
[68876b7] | 15 | <sect1 id="libcap" xreflabel="libcap-&libcap-version;">
|
---|
| 16 | <?dbhtml filename="libcap.html"?>
|
---|
[e79ed72] | 17 |
|
---|
| 18 | <sect1info>
|
---|
[4949485e] | 19 | <othername>$LastChangedBy$</othername>
|
---|
| 20 | <date>$Date$</date>
|
---|
[e79ed72] | 21 | </sect1info>
|
---|
| 22 |
|
---|
[68876b7] | 23 | <title>libcap-&libcap-version;</title>
|
---|
[e79ed72] | 24 |
|
---|
[68876b7] | 25 | <indexterm zone="libcap">
|
---|
| 26 | <primary sortas="a-libcap">libcap</primary>
|
---|
[e79ed72] | 27 | </indexterm>
|
---|
| 28 |
|
---|
| 29 | <sect2 role="package">
|
---|
[68876b7] | 30 | <title>Introduction to libcap</title>
|
---|
[e79ed72] | 31 |
|
---|
[68876b7] | 32 | <para>The <application>libcap</application> package implements the
|
---|
[e79ed72] | 33 | user-space interfaces to the POSIX 1003.1e capabilities available in Linux
|
---|
| 34 | kernels. These capabilities are a partitioning of the all powerful root
|
---|
| 35 | privilege into a set of distinct privileges. </para>
|
---|
| 36 |
|
---|
[5d9021ea] | 37 | &lfs74_checked;
|
---|
[e79ed72] | 38 |
|
---|
| 39 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 40 | <itemizedlist spacing="compact">
|
---|
| 41 | <listitem>
|
---|
[68876b7] | 42 | <para>Download (HTTP): <ulink url="&libcap-download-http;"/></para>
|
---|
[e79ed72] | 43 | </listitem>
|
---|
| 44 | <listitem>
|
---|
[68876b7] | 45 | <para>Download (FTP): <ulink url="&libcap-download-ftp;"/></para>
|
---|
[e79ed72] | 46 | </listitem>
|
---|
| 47 | <listitem>
|
---|
[68876b7] | 48 | <para>Download MD5 sum: &libcap-md5sum;</para>
|
---|
[e79ed72] | 49 | </listitem>
|
---|
| 50 | <listitem>
|
---|
[68876b7] | 51 | <para>Download size: &libcap-size;</para>
|
---|
[e79ed72] | 52 | </listitem>
|
---|
| 53 | <listitem>
|
---|
[68876b7] | 54 | <para>Estimated disk space required: &libcap-buildsize;</para>
|
---|
[e79ed72] | 55 | </listitem>
|
---|
| 56 | <listitem>
|
---|
[68876b7] | 57 | <para>Estimated build time: &libcap-time;</para>
|
---|
[e79ed72] | 58 | </listitem>
|
---|
| 59 | </itemizedlist>
|
---|
| 60 |
|
---|
[739148a] | 61 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
| 62 | <itemizedlist spacing="compact">
|
---|
| 63 | <listitem>
|
---|
| 64 | <para>
|
---|
| 65 | Required patch:
|
---|
| 66 | <ulink url="&patch-root;/libcap-&libcap-version;-uapi-1.patch"/>
|
---|
| 67 | </para>
|
---|
| 68 | </listitem>
|
---|
| 69 | </itemizedlist>
|
---|
| 70 |
|
---|
[68876b7] | 71 | <bridgehead renderas="sect3">libcap Dependencies</bridgehead>
|
---|
[e79ed72] | 72 |
|
---|
| 73 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
| 74 | <para role="required"><xref linkend="attr"/></para>
|
---|
| 75 |
|
---|
[03f32bb] | 76 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
| 77 | <para role="optional"><xref linkend="linux-pam"/></para>
|
---|
| 78 |
|
---|
[e79ed72] | 79 | <para condition="html" role="usernotes">User Notes:
|
---|
[68876b7] | 80 | <ulink url="&blfs-wiki;/libcap"/></para>
|
---|
[e79ed72] | 81 |
|
---|
| 82 | </sect2>
|
---|
| 83 |
|
---|
| 84 | <sect2 role="installation">
|
---|
[68876b7] | 85 | <title>Installation of libcap</title>
|
---|
[e79ed72] | 86 |
|
---|
[68876b7] | 87 | <para>Install <application>libcap</application> by running the following
|
---|
[e79ed72] | 88 | commands:</para>
|
---|
| 89 |
|
---|
[739148a] | 90 | <screen><userinput>patch -Np1 -i ../libcap-&libcap-version;-uapi-1.patch &&
|
---|
| 91 | make</userinput></screen>
|
---|
[e79ed72] | 92 |
|
---|
| 93 | <para>This package does not come with a test suite.</para>
|
---|
[5ec4f2b4] | 94 |
|
---|
| 95 | <para>
|
---|
| 96 | If you want to disable installing the static library, use this sed:
|
---|
| 97 | </para>
|
---|
| 98 |
|
---|
| 99 | <screen><userinput>sed -i '/install.*STALIBNAME/ s/^/#/' libcap/Makefile</userinput></screen>
|
---|
| 100 |
|
---|
[e79ed72] | 101 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
| 102 |
|
---|
[771399b] | 103 | <screen role="root"><userinput>make RAISE_SETFCAP=no \
|
---|
| 104 | prefix=/usr \
|
---|
| 105 | SBINDIR=/sbin install</userinput></screen>
|
---|
| 106 |
|
---|
| 107 | <para>
|
---|
| 108 | Still as the <systemitem class="username">root</systemitem> user,
|
---|
| 109 | clean up some library locations and permissions:
|
---|
| 110 | </para>
|
---|
| 111 |
|
---|
| 112 | <screen role="root"><userinput>chmod -v 755 /usr/lib/libcap.so &&
|
---|
[5ae7a99] | 113 | mv -v /usr/lib/libcap.so.* /lib &&
|
---|
| 114 | ln -sfv ../../lib/libcap.so.2 /usr/lib/libcap.so</userinput></screen>
|
---|
[7df66ff] | 115 |
|
---|
| 116 | </sect2>
|
---|
| 117 |
|
---|
| 118 | <sect2 role="commands">
|
---|
| 119 | <title>Command Explanations</title>
|
---|
[0d7900a] | 120 |
|
---|
[7df66ff] | 121 | <para><parameter>RAISE_SETFCAP=no</parameter>: This parameter skips trying
|
---|
[0d7900a] | 122 | to use <application>setcap</application> on itself. This avoids an installation
|
---|
[7df66ff] | 123 | error if the kernel or file system do not support extended capabilities.</para>
|
---|
[e79ed72] | 124 |
|
---|
| 125 | </sect2>
|
---|
| 126 |
|
---|
| 127 | <sect2 role="content">
|
---|
| 128 | <title>Contents</title>
|
---|
| 129 |
|
---|
| 130 | <segmentedlist>
|
---|
| 131 | <segtitle>Installed Programs</segtitle>
|
---|
| 132 | <segtitle>Installed Library</segtitle>
|
---|
| 133 | <segtitle>Installed Directories</segtitle>
|
---|
| 134 |
|
---|
| 135 | <seglistitem>
|
---|
| 136 | <seg>capsh, getcap, getpcaps, and setcap</seg>
|
---|
| 137 | <seg>libcap.{so,a}</seg>
|
---|
| 138 | <seg>None</seg>
|
---|
| 139 | </seglistitem>
|
---|
| 140 | </segmentedlist>
|
---|
| 141 |
|
---|
| 142 | <variablelist>
|
---|
| 143 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 144 | <?dbfo list-presentation="list"?>
|
---|
| 145 | <?dbhtml list-presentation="table"?>
|
---|
| 146 |
|
---|
| 147 | <varlistentry id="capsh">
|
---|
| 148 | <term><command>capsh</command></term>
|
---|
| 149 | <listitem>
|
---|
[0933ce6] | 150 | <para>is a shell wrapper to explore and constrain capability support.</para>
|
---|
[68876b7] | 151 | <indexterm zone="libcap capsh">
|
---|
[e79ed72] | 152 | <primary sortas="b-capsh">capsh</primary>
|
---|
| 153 | </indexterm>
|
---|
| 154 | </listitem>
|
---|
| 155 | </varlistentry>
|
---|
| 156 |
|
---|
| 157 | <varlistentry id="getcap">
|
---|
| 158 | <term><command>getcap</command></term>
|
---|
| 159 | <listitem>
|
---|
| 160 | <para>examines file capabilities.</para>
|
---|
[68876b7] | 161 | <indexterm zone="libcap getcap">
|
---|
[e79ed72] | 162 | <primary sortas="b-getcap">getcap</primary>
|
---|
| 163 | </indexterm>
|
---|
| 164 | </listitem>
|
---|
| 165 | </varlistentry>
|
---|
| 166 |
|
---|
| 167 | <varlistentry id="getpcaps">
|
---|
| 168 | <term><command>getpcaps</command></term>
|
---|
| 169 | <listitem>
|
---|
| 170 | <para>displays the capabilities on the queried process(es).</para>
|
---|
[68876b7] | 171 | <indexterm zone="libcap getpcaps">
|
---|
[e79ed72] | 172 | <primary sortas="b-getpcaps">getpcaps</primary>
|
---|
| 173 | </indexterm>
|
---|
| 174 | </listitem>
|
---|
| 175 | </varlistentry>
|
---|
| 176 |
|
---|
| 177 | <varlistentry id="setcap">
|
---|
| 178 | <term><command>setcap</command></term>
|
---|
| 179 | <listitem>
|
---|
| 180 | <para>sets file file capabilities.</para>
|
---|
[68876b7] | 181 | <indexterm zone="libcap setcap">
|
---|
[e79ed72] | 182 | <primary sortas="b-setcap">setcap</primary>
|
---|
| 183 | </indexterm>
|
---|
| 184 | </listitem>
|
---|
| 185 | </varlistentry>
|
---|
| 186 |
|
---|
[68876b7] | 187 | <varlistentry id="libcap-lib">
|
---|
[aef6415d] | 188 | <term><filename class='libraryfile'>libcap.{so,a}</filename></term>
|
---|
[e79ed72] | 189 | <listitem>
|
---|
[68876b7] | 190 | <para>contains the <application>libcap</application> API functions.</para>
|
---|
| 191 | <indexterm zone="libcap libcap-lib">
|
---|
| 192 | <primary sortas="c-libcap">libcap.{so,a}</primary>
|
---|
[e79ed72] | 193 | </indexterm>
|
---|
| 194 | </listitem>
|
---|
| 195 | </varlistentry>
|
---|
| 196 |
|
---|
| 197 | </variablelist>
|
---|
| 198 |
|
---|
| 199 | </sect2>
|
---|
| 200 |
|
---|
| 201 | </sect1>
|
---|