[28b3209] | 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 | ]>
|
---|
| 7 |
|
---|
| 8 | <sect1 id="ch-system-libcap" role="wrap">
|
---|
| 9 | <?dbhtml filename="libcap.html"?>
|
---|
| 10 |
|
---|
| 11 | <sect1info condition="script">
|
---|
| 12 | <productname>libcap</productname>
|
---|
| 13 | <productnumber>&libcap-version;</productnumber>
|
---|
| 14 | <address>&libcap-url;</address>
|
---|
| 15 | </sect1info>
|
---|
| 16 |
|
---|
| 17 | <title>Libcap-&libcap-version;</title>
|
---|
| 18 |
|
---|
| 19 | <indexterm zone="ch-system-libcap">
|
---|
| 20 | <primary sortas="a-Libcap">Libcap</primary>
|
---|
| 21 | </indexterm>
|
---|
| 22 |
|
---|
| 23 | <sect2 role="package">
|
---|
| 24 | <title/>
|
---|
| 25 |
|
---|
| 26 | <para>The Libcap package implements the user-space interfaces to the POSIX
|
---|
| 27 | 1003.1e capabilities available in Linux kernels. These capabilities are a
|
---|
| 28 | partitioning of the all powerful root privilege into a set of distinct
|
---|
| 29 | privileges.</para>
|
---|
| 30 |
|
---|
| 31 | <segmentedlist>
|
---|
| 32 | <segtitle>&buildtime;</segtitle>
|
---|
| 33 | <segtitle>&diskspace;</segtitle>
|
---|
| 34 |
|
---|
| 35 | <seglistitem>
|
---|
| 36 | <seg>&libcap-ch6-sbu;</seg>
|
---|
| 37 | <seg>&libcap-ch6-du;</seg>
|
---|
| 38 | </seglistitem>
|
---|
| 39 | </segmentedlist>
|
---|
| 40 |
|
---|
| 41 | </sect2>
|
---|
| 42 |
|
---|
| 43 | <sect2 role="installation">
|
---|
| 44 | <title>Installation of Libcap</title>
|
---|
| 45 |
|
---|
| 46 | <para>Compile the package:</para>
|
---|
| 47 |
|
---|
| 48 | <screen><userinput remap="make">make</userinput></screen>
|
---|
| 49 |
|
---|
| 50 | <para>This package does not come with a test suite.</para>
|
---|
| 51 |
|
---|
| 52 | <para>Install the package:</para>
|
---|
| 53 |
|
---|
| 54 | <screen><userinput remap="install">make RAISE_SETFCAP=no prefix=/usr install
|
---|
| 55 | chmod -v 755 /usr/lib/libcap.so</userinput></screen>
|
---|
| 56 |
|
---|
[aa96607] | 57 | <variablelist>
|
---|
| 58 | <title>The meaning of the make option:</title>
|
---|
| 59 |
|
---|
| 60 | <varlistentry>
|
---|
| 61 | <term><parameter>RAISE_SETFCAP=no</parameter></term>
|
---|
| 62 | <listitem>
|
---|
| 63 | <para>This parameter skips trying to use <command>setcap</command>
|
---|
| 64 | on itself. This avoids an installation error if the kernel or file
|
---|
| 65 | system does not support extended capabilities.</para>
|
---|
| 66 | </listitem>
|
---|
| 67 | </varlistentry>
|
---|
| 68 |
|
---|
| 69 | </variablelist>
|
---|
| 70 |
|
---|
[28b3209] | 71 | <para>The shared library needs to be moved to
|
---|
| 72 | <filename class="directory">/lib</filename>, and as a result the
|
---|
| 73 | <filename class="extension">.so</filename> file in
|
---|
| 74 | <filename class="directory">/usr/lib</filename> will need to be recreated:</para>
|
---|
| 75 |
|
---|
| 76 | <screen><userinput remap="install">mv -v /usr/lib/libcap.so.* /lib
|
---|
| 77 | ln -sfv ../../lib/$(readlink /usr/lib/libcap.so) /usr/lib/libcap.so</userinput></screen>
|
---|
| 78 |
|
---|
| 79 | </sect2>
|
---|
| 80 |
|
---|
| 81 | <sect2 id="contents-libcap" role="content">
|
---|
| 82 | <title>Contents of Libcap</title>
|
---|
| 83 |
|
---|
| 84 | <segmentedlist>
|
---|
| 85 | <segtitle>Installed programs</segtitle>
|
---|
| 86 | <segtitle>Installed library</segtitle>
|
---|
| 87 |
|
---|
| 88 | <seglistitem>
|
---|
| 89 | <seg>capsh, getcap, getpcaps, and setcap</seg>
|
---|
| 90 | <seg>libcap.{a,so}</seg>
|
---|
| 91 | </seglistitem>
|
---|
| 92 | </segmentedlist>
|
---|
| 93 |
|
---|
| 94 | <variablelist>
|
---|
| 95 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 96 | <?dbfo list-presentation="list"?>
|
---|
| 97 | <?dbhtml list-presentation="table"?>
|
---|
| 98 |
|
---|
| 99 | <varlistentry id="capsh">
|
---|
| 100 | <term><command>capsh</command></term>
|
---|
| 101 | <listitem>
|
---|
| 102 | <para>A shell wrapper to explore and constrain capability support</para>
|
---|
| 103 | <indexterm zone="ch-system-libcap capsh">
|
---|
| 104 | <primary sortas="b-capsh">capsh</primary>
|
---|
| 105 | </indexterm>
|
---|
| 106 | </listitem>
|
---|
| 107 | </varlistentry>
|
---|
| 108 |
|
---|
| 109 | <varlistentry id="getcap">
|
---|
| 110 | <term><command>getcap</command></term>
|
---|
| 111 | <listitem>
|
---|
| 112 | <para>Examines file capabilities</para>
|
---|
| 113 | <indexterm zone="ch-system-libcap getcap">
|
---|
| 114 | <primary sortas="b-getcap">getcap</primary>
|
---|
| 115 | </indexterm>
|
---|
| 116 | </listitem>
|
---|
| 117 | </varlistentry>
|
---|
| 118 |
|
---|
| 119 | <varlistentry id="getpcaps">
|
---|
| 120 | <term><command>getpcaps</command></term>
|
---|
| 121 | <listitem>
|
---|
| 122 | <para>Displays the capabilities on the queried process(es)</para>
|
---|
| 123 | <indexterm zone="ch-system-libcap getpcaps">
|
---|
| 124 | <primary sortas="b-getpcaps">getpcaps</primary>
|
---|
| 125 | </indexterm>
|
---|
| 126 | </listitem>
|
---|
| 127 | </varlistentry>
|
---|
| 128 |
|
---|
| 129 | <varlistentry id="libcap">
|
---|
| 130 | <term><filename class="libraryfile">libcap</filename></term>
|
---|
| 131 | <listitem>
|
---|
| 132 | <para>Contains the libcap API functions</para>
|
---|
| 133 | <indexterm zone="ch-system-libcap libcap">
|
---|
| 134 | <primary sortas="c-libcap">libcap</primary>
|
---|
| 135 | </indexterm>
|
---|
| 136 | </listitem>
|
---|
| 137 | </varlistentry>
|
---|
| 138 |
|
---|
| 139 | </variablelist>
|
---|
| 140 |
|
---|
| 141 | </sect2>
|
---|
| 142 |
|
---|
| 143 | </sect1>
|
---|