[7152faa] | 1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
[28b3209] | 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 |
|
---|
[7ae2811] | 26 | <para>The Libcap package implements the userspace interface to the POSIX
|
---|
[54948b7] | 27 | 1003.1e capabilities available in Linux kernels. These capabilities
|
---|
| 28 | partition the all-powerful root privilege into a set of distinct
|
---|
[28b3209] | 29 | privileges.</para>
|
---|
| 30 |
|
---|
| 31 | <segmentedlist>
|
---|
| 32 | <segtitle>&buildtime;</segtitle>
|
---|
| 33 | <segtitle>&diskspace;</segtitle>
|
---|
| 34 |
|
---|
| 35 | <seglistitem>
|
---|
[fb386e0] | 36 | <seg>&libcap-fin-sbu;</seg>
|
---|
| 37 | <seg>&libcap-fin-du;</seg>
|
---|
[28b3209] | 38 | </seglistitem>
|
---|
| 39 | </segmentedlist>
|
---|
| 40 |
|
---|
| 41 | </sect2>
|
---|
| 42 |
|
---|
| 43 | <sect2 role="installation">
|
---|
| 44 | <title>Installation of Libcap</title>
|
---|
| 45 |
|
---|
[e8c3099] | 46 | <para>Prevent static libraries from being installed:</para>
|
---|
[73b2841] | 47 |
|
---|
[e8c3099] | 48 | <screen><userinput remap="pre">sed -i '/install -m.*STA/d' libcap/Makefile</userinput></screen>
|
---|
[73b2841] | 49 |
|
---|
[28b3209] | 50 | <para>Compile the package:</para>
|
---|
| 51 |
|
---|
[4622193e] | 52 | <screen><userinput remap="make">make prefix=/usr lib=lib</userinput></screen>
|
---|
[28b3209] | 53 |
|
---|
[aa96607] | 54 | <variablelist>
|
---|
| 55 | <title>The meaning of the make option:</title>
|
---|
| 56 |
|
---|
[be3d9f3] | 57 | <varlistentry>
|
---|
| 58 | <term><parameter>lib=lib</parameter></term>
|
---|
| 59 | <listitem>
|
---|
[7e42b39] | 60 | <para>This parameter sets the library directory to
|
---|
[4622193e] | 61 | <filename>/usr/lib</filename> rather than
|
---|
[22166ba] | 62 | <filename>/usr/lib64</filename> on 64-bit LoongArch.</para>
|
---|
[be3d9f3] | 63 | </listitem>
|
---|
| 64 | </varlistentry>
|
---|
[aa96607] | 65 | </variablelist>
|
---|
| 66 |
|
---|
[7e42b39] | 67 | <para>To test the results, issue:</para>
|
---|
| 68 |
|
---|
| 69 | <screen><userinput remap="test">make test</userinput></screen>
|
---|
| 70 |
|
---|
[d7a9421] | 71 | <para>Install the package:</para>
|
---|
| 72 |
|
---|
| 73 | <screen><userinput remap="install">make prefix=/usr lib=lib install</userinput></screen>
|
---|
| 74 |
|
---|
[28b3209] | 75 | </sect2>
|
---|
| 76 |
|
---|
| 77 | <sect2 id="contents-libcap" role="content">
|
---|
| 78 | <title>Contents of Libcap</title>
|
---|
| 79 |
|
---|
| 80 | <segmentedlist>
|
---|
| 81 | <segtitle>Installed programs</segtitle>
|
---|
| 82 | <segtitle>Installed library</segtitle>
|
---|
| 83 |
|
---|
| 84 | <seglistitem>
|
---|
| 85 | <seg>capsh, getcap, getpcaps, and setcap</seg>
|
---|
[e8c3099] | 86 | <seg>libcap.so and libpsx.so</seg>
|
---|
[28b3209] | 87 | </seglistitem>
|
---|
| 88 | </segmentedlist>
|
---|
| 89 |
|
---|
| 90 | <variablelist>
|
---|
| 91 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 92 | <?dbfo list-presentation="list"?>
|
---|
| 93 | <?dbhtml list-presentation="table"?>
|
---|
| 94 |
|
---|
| 95 | <varlistentry id="capsh">
|
---|
| 96 | <term><command>capsh</command></term>
|
---|
| 97 | <listitem>
|
---|
| 98 | <para>A shell wrapper to explore and constrain capability support</para>
|
---|
| 99 | <indexterm zone="ch-system-libcap capsh">
|
---|
| 100 | <primary sortas="b-capsh">capsh</primary>
|
---|
| 101 | </indexterm>
|
---|
| 102 | </listitem>
|
---|
| 103 | </varlistentry>
|
---|
| 104 |
|
---|
| 105 | <varlistentry id="getcap">
|
---|
| 106 | <term><command>getcap</command></term>
|
---|
| 107 | <listitem>
|
---|
| 108 | <para>Examines file capabilities</para>
|
---|
| 109 | <indexterm zone="ch-system-libcap getcap">
|
---|
| 110 | <primary sortas="b-getcap">getcap</primary>
|
---|
| 111 | </indexterm>
|
---|
| 112 | </listitem>
|
---|
| 113 | </varlistentry>
|
---|
| 114 |
|
---|
| 115 | <varlistentry id="getpcaps">
|
---|
| 116 | <term><command>getpcaps</command></term>
|
---|
| 117 | <listitem>
|
---|
[54948b7] | 118 | <para>Displays the capabilities of the queried process(es)</para>
|
---|
[28b3209] | 119 | <indexterm zone="ch-system-libcap getpcaps">
|
---|
| 120 | <primary sortas="b-getpcaps">getpcaps</primary>
|
---|
| 121 | </indexterm>
|
---|
| 122 | </listitem>
|
---|
| 123 | </varlistentry>
|
---|
| 124 |
|
---|
[bd312dc] | 125 | <varlistentry id="setcap">
|
---|
| 126 | <term><command>setcap</command></term>
|
---|
| 127 | <listitem>
|
---|
| 128 | <para>Sets file capabilities</para>
|
---|
| 129 | <indexterm zone="ch-system-libcap setcap">
|
---|
| 130 | <primary sortas="b-setcap">setcap</primary>
|
---|
| 131 | </indexterm>
|
---|
| 132 | </listitem>
|
---|
| 133 | </varlistentry>
|
---|
| 134 |
|
---|
[0d84af1] | 135 | <varlistentry id="libcap">
|
---|
| 136 | <term><filename class="libraryfile">libcap</filename></term>
|
---|
| 137 | <listitem>
|
---|
| 138 | <para>Contains the library functions for manipulating POSIX 1003.1e
|
---|
| 139 | capabilities</para>
|
---|
| 140 | <indexterm zone="ch-system-libcap libcap">
|
---|
| 141 | <primary sortas="c-libcap">libcap</primary>
|
---|
| 142 | </indexterm>
|
---|
| 143 | </listitem>
|
---|
| 144 | </varlistentry>
|
---|
[bd312dc] | 145 |
|
---|
[7e42b39] | 146 | <varlistentry id="libpsx">
|
---|
| 147 | <term><filename class="libraryfile">libpsx</filename></term>
|
---|
| 148 | <listitem>
|
---|
| 149 | <para>Contains functions to support POSIX semantics for syscalls
|
---|
| 150 | associated with the pthread library</para>
|
---|
| 151 | <indexterm zone="ch-system-libcap libpsx">
|
---|
| 152 | <primary sortas="c-libpsx">libpsx</primary>
|
---|
| 153 | </indexterm>
|
---|
| 154 | </listitem>
|
---|
| 155 | </varlistentry>
|
---|
| 156 |
|
---|
[28b3209] | 157 | </variablelist>
|
---|
| 158 |
|
---|
| 159 | </sect2>
|
---|
| 160 |
|
---|
| 161 | </sect1>
|
---|