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-fin-sbu;</seg>
|
---|
37 | <seg>&libcap-fin-du;</seg>
|
---|
38 | </seglistitem>
|
---|
39 | </segmentedlist>
|
---|
40 |
|
---|
41 | </sect2>
|
---|
42 |
|
---|
43 | <sect2 role="installation">
|
---|
44 | <title>Installation of Libcap</title>
|
---|
45 |
|
---|
46 | <para>Prevent static libraries from being installed:</para>
|
---|
47 |
|
---|
48 | <screen><userinput remap="pre">sed -i '/install -m.*STA/d' libcap/Makefile</userinput></screen>
|
---|
49 |
|
---|
50 | <para>Compile the package:</para>
|
---|
51 |
|
---|
52 | <screen><userinput remap="make">make prefix=/usr lib=lib</userinput></screen>
|
---|
53 |
|
---|
54 | <variablelist>
|
---|
55 | <title>The meaning of the make option:</title>
|
---|
56 |
|
---|
57 | <varlistentry>
|
---|
58 | <term><parameter>lib=lib</parameter></term>
|
---|
59 | <listitem>
|
---|
60 | <para>This parameter sets the library directory to
|
---|
61 | <filename>/usr/lib</filename> rather than
|
---|
62 | <filename>/usr/lib64</filename> on x86_64. It has no effect on
|
---|
63 | x86.</para>
|
---|
64 | </listitem>
|
---|
65 | </varlistentry>
|
---|
66 | </variablelist>
|
---|
67 |
|
---|
68 | <para>To test the results, issue:</para>
|
---|
69 |
|
---|
70 | <screen><userinput remap="test">make test</userinput></screen>
|
---|
71 |
|
---|
72 | <para>Install the package and make sure the essential libraries are in
|
---|
73 | the correct directory:</para>
|
---|
74 |
|
---|
75 | <screen><userinput remap="install">make prefix=/usr lib=lib install
|
---|
76 | for libname in cap psx; do
|
---|
77 | mv -v /usr/lib/lib${libname}.so.* /lib
|
---|
78 | ln -sfv ../../lib/lib${libname}.so.2 /usr/lib/lib${libname}.so
|
---|
79 | chmod -v 755 /lib/lib${libname}.so.&libcap-version;
|
---|
80 | done</userinput></screen>
|
---|
81 |
|
---|
82 | </sect2>
|
---|
83 |
|
---|
84 | <!-- - - - - - - - - - -->
|
---|
85 | <!-- Multilib - 32bit -->
|
---|
86 | <!-- - - - - - - - - - -->
|
---|
87 |
|
---|
88 | <sect2 arch="ml_32,ml_all" role="installation">
|
---|
89 | <title>Installation of Libcap - 32bit</title>
|
---|
90 |
|
---|
91 | <para>Clean previous build:</para>
|
---|
92 |
|
---|
93 | <screen><userinput remap="pre">make distclean</userinput></screen>
|
---|
94 |
|
---|
95 | <para>Compile the package:</para>
|
---|
96 |
|
---|
97 | <screen><userinput remap="make">make CC="gcc -m32 -march=i686"</userinput></screen>
|
---|
98 |
|
---|
99 | <para>Install the package:</para>
|
---|
100 |
|
---|
101 | <screen><userinput remap="install">make lib=lib32 prefix=$PWD/DESTDIR/usr -C libcap install
|
---|
102 | cp -Rv DESTDIR&usr-lib-m32;/* &usr-lib-m32;
|
---|
103 | sed -e "s|^libdir=.*|libdir=&usr-lib-m32;|" -i &usr-lib-m32;/pkgconfig/lib{cap,psx}.pc
|
---|
104 | chmod -v 755 &usr-lib-m32;/libcap.so.&libcap-version;
|
---|
105 | rm -rf DESTDIR</userinput></screen>
|
---|
106 |
|
---|
107 | </sect2><!-- m32 -->
|
---|
108 |
|
---|
109 | <!-- - - - - - - - - - -->
|
---|
110 | <!-- Multilib - x32bit -->
|
---|
111 | <!-- - - - - - - - - - -->
|
---|
112 |
|
---|
113 | <sect2 arch="ml_x32,ml_all" role="installation">
|
---|
114 | <title>Installation of Libcap - x32bit</title>
|
---|
115 |
|
---|
116 | <para>Clean previous build:</para>
|
---|
117 |
|
---|
118 | <screen><userinput remap="pre">make distclean</userinput></screen>
|
---|
119 |
|
---|
120 | <para>Compile the package:</para>
|
---|
121 |
|
---|
122 | <screen><userinput remap="make">make CC="gcc -mx32 -march=x86-64"</userinput></screen>
|
---|
123 |
|
---|
124 | <para>Install the package:</para>
|
---|
125 |
|
---|
126 | <screen><userinput remap="install">make lib=libx32 prefix=$PWD/DESTDIR/usr -C libcap install
|
---|
127 | cp -Rv DESTDIR&usr-lib-mx32;/* &usr-lib-mx32;
|
---|
128 | sed -e "s|^libdir=.*|libdir=&usr-lib-mx32;|" -i &usr-lib-mx32;/pkgconfig/lib{cap,psx}.pc
|
---|
129 | chmod -v 755 &usr-lib-mx32;/libcap.so.&libcap-version;
|
---|
130 | rm -rf DESTDIR</userinput></screen>
|
---|
131 |
|
---|
132 | </sect2><!-- mx32 -->
|
---|
133 |
|
---|
134 | <sect2 id="contents-libcap" role="content">
|
---|
135 | <title>Contents of Libcap</title>
|
---|
136 |
|
---|
137 | <segmentedlist>
|
---|
138 | <segtitle>Installed programs</segtitle>
|
---|
139 | <segtitle>Installed library</segtitle>
|
---|
140 |
|
---|
141 | <seglistitem>
|
---|
142 | <seg>capsh, getcap, getpcaps, and setcap</seg>
|
---|
143 | <seg>libcap.so and libpsx.so</seg>
|
---|
144 | </seglistitem>
|
---|
145 | </segmentedlist>
|
---|
146 |
|
---|
147 | <variablelist>
|
---|
148 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
149 | <?dbfo list-presentation="list"?>
|
---|
150 | <?dbhtml list-presentation="table"?>
|
---|
151 |
|
---|
152 | <varlistentry id="capsh">
|
---|
153 | <term><command>capsh</command></term>
|
---|
154 | <listitem>
|
---|
155 | <para>A shell wrapper to explore and constrain capability support</para>
|
---|
156 | <indexterm zone="ch-system-libcap capsh">
|
---|
157 | <primary sortas="b-capsh">capsh</primary>
|
---|
158 | </indexterm>
|
---|
159 | </listitem>
|
---|
160 | </varlistentry>
|
---|
161 |
|
---|
162 | <varlistentry id="getcap">
|
---|
163 | <term><command>getcap</command></term>
|
---|
164 | <listitem>
|
---|
165 | <para>Examines file capabilities</para>
|
---|
166 | <indexterm zone="ch-system-libcap getcap">
|
---|
167 | <primary sortas="b-getcap">getcap</primary>
|
---|
168 | </indexterm>
|
---|
169 | </listitem>
|
---|
170 | </varlistentry>
|
---|
171 |
|
---|
172 | <varlistentry id="getpcaps">
|
---|
173 | <term><command>getpcaps</command></term>
|
---|
174 | <listitem>
|
---|
175 | <para>Displays the capabilities on the queried process(es)</para>
|
---|
176 | <indexterm zone="ch-system-libcap getpcaps">
|
---|
177 | <primary sortas="b-getpcaps">getpcaps</primary>
|
---|
178 | </indexterm>
|
---|
179 | </listitem>
|
---|
180 | </varlistentry>
|
---|
181 |
|
---|
182 | <varlistentry id="setcap">
|
---|
183 | <term><command>setcap</command></term>
|
---|
184 | <listitem>
|
---|
185 | <para>Sets file capabilities</para>
|
---|
186 | <indexterm zone="ch-system-libcap setcap">
|
---|
187 | <primary sortas="b-setcap">setcap</primary>
|
---|
188 | </indexterm>
|
---|
189 | </listitem>
|
---|
190 | </varlistentry>
|
---|
191 |
|
---|
192 | <varlistentry id="libcap">
|
---|
193 | <term><filename class="libraryfile">libcap</filename></term>
|
---|
194 | <listitem>
|
---|
195 | <para>Contains the library functions for manipulating POSIX 1003.1e
|
---|
196 | capabilities</para>
|
---|
197 | <indexterm zone="ch-system-libcap libcap">
|
---|
198 | <primary sortas="c-libcap">libcap</primary>
|
---|
199 | </indexterm>
|
---|
200 | </listitem>
|
---|
201 | </varlistentry>
|
---|
202 |
|
---|
203 | <varlistentry id="libpsx">
|
---|
204 | <term><filename class="libraryfile">libpsx</filename></term>
|
---|
205 | <listitem>
|
---|
206 | <para>Contains functions to support POSIX semantics for syscalls
|
---|
207 | associated with the pthread library</para>
|
---|
208 | <indexterm zone="ch-system-libcap libpsx">
|
---|
209 | <primary sortas="c-libpsx">libpsx</primary>
|
---|
210 | </indexterm>
|
---|
211 | </listitem>
|
---|
212 | </varlistentry>
|
---|
213 |
|
---|
214 | </variablelist>
|
---|
215 |
|
---|
216 | </sect2>
|
---|
217 |
|
---|
218 | </sect1>
|
---|