source: chapter08/libcap.xml@ 577ac46

11.0 11.0-rc1 11.0-rc2 11.0-rc3 11.1 11.1-rc1 11.2 11.2-rc1 11.3 11.3-rc1 12.0 12.0-rc1 12.1 12.1-rc1 arm bdubbs/gcc13 ml-11.0 multilib renodr/libudev-from-systemd s6-init trunk xry111/arm64 xry111/arm64-12.0 xry111/clfs-ng xry111/lfs-next xry111/loongarch xry111/loongarch-12.0 xry111/loongarch-12.1 xry111/mips64el xry111/pip3 xry111/rust-wip-20221008 xry111/update-glibc
Last change on this file since 577ac46 was 577ac46, checked in by Bruce Dubbs <bdubbs@…>, 3 years ago

Ensure capsh in installed from the libcap package.

  • Property mode set to 100644
File size: 5.2 KB
Line 
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>First, fix an upstream oversight in the latest release:</para>
47
48<screen><userinput remap="pre">sed -i 's/ $(PROGS)/&amp; capsh/' progs/Makefile</userinput></screen>
49
50 <para>Prevent static libraries from being installed:</para>
51
52<screen><userinput remap="pre">sed -i '/install -m.*STA/d' libcap/Makefile</userinput></screen>
53
54 <para>Compile the package:</para>
55
56<screen><userinput remap="make">make prefix=/usr lib=lib</userinput></screen>
57
58 <variablelist>
59 <title>The meaning of the make option:</title>
60
61 <varlistentry>
62 <term><parameter>lib=lib</parameter></term>
63 <listitem>
64 <para>This parameter sets the library directory to
65 <filename>/usr/lib</filename> rather than
66 <filename>/usr/lib64</filename> on x86_64. It has no effect on
67 x86.</para>
68 </listitem>
69 </varlistentry>
70 </variablelist>
71
72 <para>To test the results, issue:</para>
73
74<screen><userinput remap="test">make test</userinput></screen>
75
76 <para>Install the package:</para>
77
78<screen><userinput remap="install">make prefix=/usr lib=lib install</userinput></screen>
79
80 <para>Adjust the permission of the shared libraries:</para>
81
82<screen><userinput remap="install">chmod -v 755 /usr/lib/lib{cap,psx}.so.&libcap-version;</userinput></screen>
83
84 </sect2>
85
86 <sect2 id="contents-libcap" role="content">
87 <title>Contents of Libcap</title>
88
89 <segmentedlist>
90 <segtitle>Installed programs</segtitle>
91 <segtitle>Installed library</segtitle>
92
93 <seglistitem>
94 <seg>capsh, getcap, getpcaps, and setcap</seg>
95 <seg>libcap.so and libpsx.so</seg>
96 </seglistitem>
97 </segmentedlist>
98
99 <variablelist>
100 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
101 <?dbfo list-presentation="list"?>
102 <?dbhtml list-presentation="table"?>
103
104 <varlistentry id="capsh">
105 <term><command>capsh</command></term>
106 <listitem>
107 <para>A shell wrapper to explore and constrain capability support</para>
108 <indexterm zone="ch-system-libcap capsh">
109 <primary sortas="b-capsh">capsh</primary>
110 </indexterm>
111 </listitem>
112 </varlistentry>
113
114 <varlistentry id="getcap">
115 <term><command>getcap</command></term>
116 <listitem>
117 <para>Examines file capabilities</para>
118 <indexterm zone="ch-system-libcap getcap">
119 <primary sortas="b-getcap">getcap</primary>
120 </indexterm>
121 </listitem>
122 </varlistentry>
123
124 <varlistentry id="getpcaps">
125 <term><command>getpcaps</command></term>
126 <listitem>
127 <para>Displays the capabilities on the queried process(es)</para>
128 <indexterm zone="ch-system-libcap getpcaps">
129 <primary sortas="b-getpcaps">getpcaps</primary>
130 </indexterm>
131 </listitem>
132 </varlistentry>
133
134 <varlistentry id="setcap">
135 <term><command>setcap</command></term>
136 <listitem>
137 <para>Sets file capabilities</para>
138 <indexterm zone="ch-system-libcap setcap">
139 <primary sortas="b-setcap">setcap</primary>
140 </indexterm>
141 </listitem>
142 </varlistentry>
143
144 <varlistentry id="libcap">
145 <term><filename class="libraryfile">libcap</filename></term>
146 <listitem>
147 <para>Contains the library functions for manipulating POSIX 1003.1e
148 capabilities</para>
149 <indexterm zone="ch-system-libcap libcap">
150 <primary sortas="c-libcap">libcap</primary>
151 </indexterm>
152 </listitem>
153 </varlistentry>
154
155 <varlistentry id="libpsx">
156 <term><filename class="libraryfile">libpsx</filename></term>
157 <listitem>
158 <para>Contains functions to support POSIX semantics for syscalls
159 associated with the pthread library</para>
160 <indexterm zone="ch-system-libcap libpsx">
161 <primary sortas="c-libpsx">libpsx</primary>
162 </indexterm>
163 </listitem>
164 </varlistentry>
165
166 </variablelist>
167
168 </sect2>
169
170</sect1>
Note: See TracBrowser for help on using the repository browser.