[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 |
|
---|
[68876b7] | 61 | <bridgehead renderas="sect3">libcap Dependencies</bridgehead>
|
---|
[e79ed72] | 62 |
|
---|
| 63 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
| 64 | <para role="required"><xref linkend="attr"/></para>
|
---|
| 65 |
|
---|
[03f32bb] | 66 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
| 67 | <para role="optional"><xref linkend="linux-pam"/></para>
|
---|
| 68 |
|
---|
[e79ed72] | 69 | <para condition="html" role="usernotes">User Notes:
|
---|
[68876b7] | 70 | <ulink url="&blfs-wiki;/libcap"/></para>
|
---|
[e79ed72] | 71 |
|
---|
| 72 | </sect2>
|
---|
| 73 |
|
---|
| 74 | <sect2 role="installation">
|
---|
[68876b7] | 75 | <title>Installation of libcap</title>
|
---|
[e79ed72] | 76 |
|
---|
[68876b7] | 77 | <para>Install <application>libcap</application> by running the following
|
---|
[e79ed72] | 78 | commands:</para>
|
---|
| 79 |
|
---|
| 80 | <screen><userinput>make</userinput></screen>
|
---|
| 81 |
|
---|
| 82 | <para>This package does not come with a test suite.</para>
|
---|
[5ec4f2b4] | 83 |
|
---|
| 84 | <para>
|
---|
| 85 | If you want to disable installing the static library, use this sed:
|
---|
| 86 | </para>
|
---|
| 87 |
|
---|
| 88 | <screen><userinput>sed -i '/install.*STALIBNAME/ s/^/#/' libcap/Makefile</userinput></screen>
|
---|
| 89 |
|
---|
[e79ed72] | 90 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
| 91 |
|
---|
[771399b] | 92 | <screen role="root"><userinput>make RAISE_SETFCAP=no \
|
---|
| 93 | prefix=/usr \
|
---|
| 94 | SBINDIR=/sbin install</userinput></screen>
|
---|
| 95 |
|
---|
| 96 | <para>
|
---|
| 97 | Still as the <systemitem class="username">root</systemitem> user,
|
---|
| 98 | clean up some library locations and permissions:
|
---|
| 99 | </para>
|
---|
| 100 |
|
---|
| 101 | <screen role="root"><userinput>chmod -v 755 /usr/lib/libcap.so &&
|
---|
[5ae7a99] | 102 | mv -v /usr/lib/libcap.so.* /lib &&
|
---|
| 103 | ln -sfv ../../lib/libcap.so.2 /usr/lib/libcap.so</userinput></screen>
|
---|
[7df66ff] | 104 |
|
---|
| 105 | </sect2>
|
---|
| 106 |
|
---|
| 107 | <sect2 role="commands">
|
---|
| 108 | <title>Command Explanations</title>
|
---|
[0d7900a] | 109 |
|
---|
[7df66ff] | 110 | <para><parameter>RAISE_SETFCAP=no</parameter>: This parameter skips trying
|
---|
[0d7900a] | 111 | to use <application>setcap</application> on itself. This avoids an installation
|
---|
[7df66ff] | 112 | error if the kernel or file system do not support extended capabilities.</para>
|
---|
[e79ed72] | 113 |
|
---|
| 114 | </sect2>
|
---|
| 115 |
|
---|
| 116 | <sect2 role="content">
|
---|
| 117 | <title>Contents</title>
|
---|
| 118 |
|
---|
| 119 | <segmentedlist>
|
---|
| 120 | <segtitle>Installed Programs</segtitle>
|
---|
| 121 | <segtitle>Installed Library</segtitle>
|
---|
| 122 | <segtitle>Installed Directories</segtitle>
|
---|
| 123 |
|
---|
| 124 | <seglistitem>
|
---|
| 125 | <seg>capsh, getcap, getpcaps, and setcap</seg>
|
---|
| 126 | <seg>libcap.{so,a}</seg>
|
---|
| 127 | <seg>None</seg>
|
---|
| 128 | </seglistitem>
|
---|
| 129 | </segmentedlist>
|
---|
| 130 |
|
---|
| 131 | <variablelist>
|
---|
| 132 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 133 | <?dbfo list-presentation="list"?>
|
---|
| 134 | <?dbhtml list-presentation="table"?>
|
---|
| 135 |
|
---|
| 136 | <varlistentry id="capsh">
|
---|
| 137 | <term><command>capsh</command></term>
|
---|
| 138 | <listitem>
|
---|
[0933ce6] | 139 | <para>is a shell wrapper to explore and constrain capability support.</para>
|
---|
[68876b7] | 140 | <indexterm zone="libcap capsh">
|
---|
[e79ed72] | 141 | <primary sortas="b-capsh">capsh</primary>
|
---|
| 142 | </indexterm>
|
---|
| 143 | </listitem>
|
---|
| 144 | </varlistentry>
|
---|
| 145 |
|
---|
| 146 | <varlistentry id="getcap">
|
---|
| 147 | <term><command>getcap</command></term>
|
---|
| 148 | <listitem>
|
---|
| 149 | <para>examines file capabilities.</para>
|
---|
[68876b7] | 150 | <indexterm zone="libcap getcap">
|
---|
[e79ed72] | 151 | <primary sortas="b-getcap">getcap</primary>
|
---|
| 152 | </indexterm>
|
---|
| 153 | </listitem>
|
---|
| 154 | </varlistentry>
|
---|
| 155 |
|
---|
| 156 | <varlistentry id="getpcaps">
|
---|
| 157 | <term><command>getpcaps</command></term>
|
---|
| 158 | <listitem>
|
---|
| 159 | <para>displays the capabilities on the queried process(es).</para>
|
---|
[68876b7] | 160 | <indexterm zone="libcap getpcaps">
|
---|
[e79ed72] | 161 | <primary sortas="b-getpcaps">getpcaps</primary>
|
---|
| 162 | </indexterm>
|
---|
| 163 | </listitem>
|
---|
| 164 | </varlistentry>
|
---|
| 165 |
|
---|
| 166 | <varlistentry id="setcap">
|
---|
| 167 | <term><command>setcap</command></term>
|
---|
| 168 | <listitem>
|
---|
| 169 | <para>sets file file capabilities.</para>
|
---|
[68876b7] | 170 | <indexterm zone="libcap setcap">
|
---|
[e79ed72] | 171 | <primary sortas="b-setcap">setcap</primary>
|
---|
| 172 | </indexterm>
|
---|
| 173 | </listitem>
|
---|
| 174 | </varlistentry>
|
---|
| 175 |
|
---|
[68876b7] | 176 | <varlistentry id="libcap-lib">
|
---|
[aef6415d] | 177 | <term><filename class='libraryfile'>libcap.{so,a}</filename></term>
|
---|
[e79ed72] | 178 | <listitem>
|
---|
[68876b7] | 179 | <para>contains the <application>libcap</application> API functions.</para>
|
---|
| 180 | <indexterm zone="libcap libcap-lib">
|
---|
| 181 | <primary sortas="c-libcap">libcap.{so,a}</primary>
|
---|
[e79ed72] | 182 | </indexterm>
|
---|
| 183 | </listitem>
|
---|
| 184 | </varlistentry>
|
---|
| 185 |
|
---|
| 186 | </variablelist>
|
---|
| 187 |
|
---|
| 188 | </sect2>
|
---|
| 189 |
|
---|
| 190 | </sect1>
|
---|