[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">
|
---|
[bf75b22] | 9 | <!ENTITY libcap-md5sum "d43ab9f680435a7fff35b4ace8d45b80">
|
---|
| 10 | <!ENTITY libcap-size "62 KB">
|
---|
[c542fdec] | 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 |
|
---|
[41b674d] | 37 | &lfs75_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 |
|
---|
[bf75b22] | 80 | <screen><userinput>sed -i 's:LIBDIR:PAM_&:g' pam_cap/Makefile &&
|
---|
[739148a] | 81 | make</userinput></screen>
|
---|
[e79ed72] | 82 |
|
---|
| 83 | <para>This package does not come with a test suite.</para>
|
---|
[5ec4f2b4] | 84 |
|
---|
| 85 | <para>
|
---|
| 86 | If you want to disable installing the static library, use this sed:
|
---|
| 87 | </para>
|
---|
| 88 |
|
---|
| 89 | <screen><userinput>sed -i '/install.*STALIBNAME/ s/^/#/' libcap/Makefile</userinput></screen>
|
---|
| 90 |
|
---|
[e79ed72] | 91 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
| 92 |
|
---|
[bf75b22] | 93 | <!-- dev note: make DESTDIR=<DESTDIR> prefix=/usr SBINDIR=<DESTDIR>/sbin PAM_LIBDIR=<DESTDIR>/lib RAISE_SETFCAP=no -->
|
---|
| 94 |
|
---|
| 95 | <screen role="root"><userinput>make prefix=/usr \
|
---|
| 96 | SBINDIR=/sbin \
|
---|
| 97 | PAM_LIBDIR=/lib \
|
---|
| 98 | RAISE_SETFCAP=no install</userinput></screen>
|
---|
[771399b] | 99 |
|
---|
| 100 | <para>
|
---|
| 101 | Still as the <systemitem class="username">root</systemitem> user,
|
---|
| 102 | clean up some library locations and permissions:
|
---|
| 103 | </para>
|
---|
| 104 |
|
---|
| 105 | <screen role="root"><userinput>chmod -v 755 /usr/lib/libcap.so &&
|
---|
[5ae7a99] | 106 | mv -v /usr/lib/libcap.so.* /lib &&
|
---|
| 107 | ln -sfv ../../lib/libcap.so.2 /usr/lib/libcap.so</userinput></screen>
|
---|
[7df66ff] | 108 |
|
---|
| 109 | </sect2>
|
---|
| 110 |
|
---|
| 111 | <sect2 role="commands">
|
---|
| 112 | <title>Command Explanations</title>
|
---|
[0d7900a] | 113 |
|
---|
[bf75b22] | 114 | <para>
|
---|
| 115 | <command>sed -i '...'</command>, <parameter>PAM_LIBDIR=/lib</parameter>:
|
---|
| 116 | These correct PAM module install location.
|
---|
| 117 | </para>
|
---|
| 118 |
|
---|
[7df66ff] | 119 | <para><parameter>RAISE_SETFCAP=no</parameter>: This parameter skips trying
|
---|
[0d7900a] | 120 | to use <application>setcap</application> on itself. This avoids an installation
|
---|
[7df66ff] | 121 | error if the kernel or file system do not support extended capabilities.</para>
|
---|
[e79ed72] | 122 |
|
---|
| 123 | </sect2>
|
---|
| 124 |
|
---|
| 125 | <sect2 role="content">
|
---|
| 126 | <title>Contents</title>
|
---|
| 127 |
|
---|
| 128 | <segmentedlist>
|
---|
| 129 | <segtitle>Installed Programs</segtitle>
|
---|
| 130 | <segtitle>Installed Library</segtitle>
|
---|
| 131 | <segtitle>Installed Directories</segtitle>
|
---|
| 132 |
|
---|
| 133 | <seglistitem>
|
---|
| 134 | <seg>capsh, getcap, getpcaps, and setcap</seg>
|
---|
| 135 | <seg>libcap.{so,a}</seg>
|
---|
| 136 | <seg>None</seg>
|
---|
| 137 | </seglistitem>
|
---|
| 138 | </segmentedlist>
|
---|
| 139 |
|
---|
| 140 | <variablelist>
|
---|
| 141 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 142 | <?dbfo list-presentation="list"?>
|
---|
| 143 | <?dbhtml list-presentation="table"?>
|
---|
| 144 |
|
---|
| 145 | <varlistentry id="capsh">
|
---|
| 146 | <term><command>capsh</command></term>
|
---|
| 147 | <listitem>
|
---|
[0933ce6] | 148 | <para>is a shell wrapper to explore and constrain capability support.</para>
|
---|
[68876b7] | 149 | <indexterm zone="libcap capsh">
|
---|
[e79ed72] | 150 | <primary sortas="b-capsh">capsh</primary>
|
---|
| 151 | </indexterm>
|
---|
| 152 | </listitem>
|
---|
| 153 | </varlistentry>
|
---|
| 154 |
|
---|
| 155 | <varlistentry id="getcap">
|
---|
| 156 | <term><command>getcap</command></term>
|
---|
| 157 | <listitem>
|
---|
| 158 | <para>examines file capabilities.</para>
|
---|
[68876b7] | 159 | <indexterm zone="libcap getcap">
|
---|
[e79ed72] | 160 | <primary sortas="b-getcap">getcap</primary>
|
---|
| 161 | </indexterm>
|
---|
| 162 | </listitem>
|
---|
| 163 | </varlistentry>
|
---|
| 164 |
|
---|
| 165 | <varlistentry id="getpcaps">
|
---|
| 166 | <term><command>getpcaps</command></term>
|
---|
| 167 | <listitem>
|
---|
| 168 | <para>displays the capabilities on the queried process(es).</para>
|
---|
[68876b7] | 169 | <indexterm zone="libcap getpcaps">
|
---|
[e79ed72] | 170 | <primary sortas="b-getpcaps">getpcaps</primary>
|
---|
| 171 | </indexterm>
|
---|
| 172 | </listitem>
|
---|
| 173 | </varlistentry>
|
---|
| 174 |
|
---|
| 175 | <varlistentry id="setcap">
|
---|
| 176 | <term><command>setcap</command></term>
|
---|
| 177 | <listitem>
|
---|
| 178 | <para>sets file file capabilities.</para>
|
---|
[68876b7] | 179 | <indexterm zone="libcap setcap">
|
---|
[e79ed72] | 180 | <primary sortas="b-setcap">setcap</primary>
|
---|
| 181 | </indexterm>
|
---|
| 182 | </listitem>
|
---|
| 183 | </varlistentry>
|
---|
| 184 |
|
---|
[68876b7] | 185 | <varlistentry id="libcap-lib">
|
---|
[aef6415d] | 186 | <term><filename class='libraryfile'>libcap.{so,a}</filename></term>
|
---|
[e79ed72] | 187 | <listitem>
|
---|
[68876b7] | 188 | <para>contains the <application>libcap</application> API functions.</para>
|
---|
| 189 | <indexterm zone="libcap libcap-lib">
|
---|
| 190 | <primary sortas="c-libcap">libcap.{so,a}</primary>
|
---|
[e79ed72] | 191 | </indexterm>
|
---|
| 192 | </listitem>
|
---|
| 193 | </varlistentry>
|
---|
| 194 |
|
---|
| 195 | </variablelist>
|
---|
| 196 |
|
---|
| 197 | </sect2>
|
---|
| 198 |
|
---|
| 199 | </sect1>
|
---|