[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 |
|
---|
[8dfc5c3] | 7 | <!ENTITY libcap-download-http "&kernel-dl;/linux/libs/security/linux-privs/libcap2/libcap-&libcap-version;.tar.xz">
|
---|
[faa68e4a] | 8 | <!ENTITY libcap-download-ftp " ">
|
---|
[1b9f28f] | 9 | <!ENTITY libcap-md5sum "dcc6220b4a9bf260050b20c07edcddf4">
|
---|
| 10 | <!ENTITY libcap-size "112 KB">
|
---|
| 11 | <!ENTITY libcap-buildsize "1.0 MB">
|
---|
[3fa31b47] | 12 | <!ENTITY libcap-time "less than 0.1 SBU">
|
---|
[e79ed72] | 13 | ]>
|
---|
| 14 |
|
---|
[56605b9] | 15 | <sect1 id="libcap-pam" xreflabel="libcap-&libcap-version; with PAM">
|
---|
[68876b7] | 16 | <?dbhtml filename="libcap.html"?>
|
---|
[e79ed72] | 17 |
|
---|
| 18 | <sect1info>
|
---|
[4949485e] | 19 | <othername>$LastChangedBy$</othername>
|
---|
| 20 | <date>$Date$</date>
|
---|
[e79ed72] | 21 | </sect1info>
|
---|
| 22 |
|
---|
[56605b9] | 23 | <title>libcap-&libcap-version; with PAM</title>
|
---|
[e79ed72] | 24 |
|
---|
[56605b9] | 25 | <indexterm zone="libcap-pam">
|
---|
| 26 | <primary sortas="a-libcap-pam">libcap</primary>
|
---|
[e79ed72] | 27 | </indexterm>
|
---|
| 28 |
|
---|
| 29 | <sect2 role="package">
|
---|
[56605b9] | 30 | <title>Introduction to libcap with PAM</title>
|
---|
[e79ed72] | 31 |
|
---|
[47274444] | 32 | <para>
|
---|
| 33 | The <application>libcap</application> package was installed in
|
---|
| 34 | LFS, but if <application>Linux-PAM</application> support is desired,
|
---|
| 35 | the PAM module must be built (after installation of
|
---|
| 36 | <application>Linux-PAM</application>).
|
---|
| 37 | </para>
|
---|
[33c9d33] | 38 |
|
---|
[66c4901f] | 39 | &lfs91_checked;
|
---|
[e79ed72] | 40 |
|
---|
| 41 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 42 | <itemizedlist spacing="compact">
|
---|
| 43 | <listitem>
|
---|
[47274444] | 44 | <para>
|
---|
| 45 | Download (HTTP): <ulink url="&libcap-download-http;"/>
|
---|
| 46 | </para>
|
---|
[e79ed72] | 47 | </listitem>
|
---|
| 48 | <listitem>
|
---|
[47274444] | 49 | <para>
|
---|
| 50 | Download (FTP): <ulink url="&libcap-download-ftp;"/>
|
---|
| 51 | </para>
|
---|
[e79ed72] | 52 | </listitem>
|
---|
| 53 | <listitem>
|
---|
[47274444] | 54 | <para>
|
---|
| 55 | Download MD5 sum: &libcap-md5sum;
|
---|
| 56 | </para>
|
---|
[e79ed72] | 57 | </listitem>
|
---|
| 58 | <listitem>
|
---|
[47274444] | 59 | <para>
|
---|
| 60 | Download size: &libcap-size;
|
---|
| 61 | </para>
|
---|
[e79ed72] | 62 | </listitem>
|
---|
| 63 | <listitem>
|
---|
[47274444] | 64 | <para>
|
---|
| 65 | Estimated disk space required: &libcap-buildsize;
|
---|
| 66 | </para>
|
---|
[e79ed72] | 67 | </listitem>
|
---|
| 68 | <listitem>
|
---|
[47274444] | 69 | <para>
|
---|
| 70 | Estimated build time: &libcap-time;
|
---|
| 71 | </para>
|
---|
[e79ed72] | 72 | </listitem>
|
---|
| 73 | </itemizedlist>
|
---|
| 74 |
|
---|
[68876b7] | 75 | <bridgehead renderas="sect3">libcap Dependencies</bridgehead>
|
---|
[e79ed72] | 76 |
|
---|
| 77 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
[f586237] | 78 | <para role="required">
|
---|
| 79 | <xref linkend="linux-pam"/>
|
---|
| 80 | </para>
|
---|
[03f32bb] | 81 |
|
---|
[e79ed72] | 82 | <para condition="html" role="usernotes">User Notes:
|
---|
[68876b7] | 83 | <ulink url="&blfs-wiki;/libcap"/></para>
|
---|
[e79ed72] | 84 |
|
---|
| 85 | </sect2>
|
---|
| 86 |
|
---|
| 87 | <sect2 role="installation">
|
---|
[68876b7] | 88 | <title>Installation of libcap</title>
|
---|
[e79ed72] | 89 |
|
---|
[57b3c45] | 90 | <note>
|
---|
[47274444] | 91 | <para>
|
---|
| 92 | If you are upgrading libcap from a previous version, use the
|
---|
| 93 | instructions in
|
---|
| 94 | <ulink url="../../../../lfs/view/development/chapter06/libcap.html">
|
---|
| 95 | LFS libcap page
|
---|
| 96 | </ulink> to upgrade libcap. If <xref linkend="linux-pam"/> has been
|
---|
| 97 | built, the PAM module will automatically be built too.
|
---|
| 98 | </para>
|
---|
[57b3c45] | 99 | </note>
|
---|
| 100 |
|
---|
[47274444] | 101 | <para>
|
---|
| 102 | Install <application>libcap</application> by running the following
|
---|
| 103 | commands:
|
---|
| 104 | </para>
|
---|
[e79ed72] | 105 |
|
---|
[f586237] | 106 | <screen><userinput>make -C pam_cap</userinput></screen>
|
---|
[e79ed72] | 107 |
|
---|
[47274444] | 108 | <para>
|
---|
| 109 | This package does not come with a test suite.
|
---|
| 110 | </para>
|
---|
[5ec4f2b4] | 111 |
|
---|
[47274444] | 112 | <para>
|
---|
| 113 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 114 | </para>
|
---|
[e79ed72] | 115 |
|
---|
[f586237] | 116 | <screen role="root"><userinput>install -v -m755 pam_cap/pam_cap.so /lib/security &&
|
---|
| 117 | install -v -m644 pam_cap/capability.conf /etc/security</userinput></screen>
|
---|
[e79ed72] | 118 |
|
---|
| 119 | </sect2>
|
---|
| 120 |
|
---|
[3706c7fe] | 121 | <sect2 role="configuration">
|
---|
| 122 | <title>Configuring Libcap</title>
|
---|
| 123 |
|
---|
[47274444] | 124 | <para>
|
---|
| 125 | In order to allow <application>Linux-PAM</application> to grant
|
---|
| 126 | privileges based on POSIX capabilites, you need to add the libcap module
|
---|
| 127 | to the begining of the <filename>/etc/pam.d/system-auth</filename> file.
|
---|
| 128 | Make the required edits with the following commands:
|
---|
| 129 | </para>
|
---|
[3706c7fe] | 130 |
|
---|
| 131 | <screen role="root"><userinput>mv -v /etc/pam.d/system-auth{,.bak} &&
|
---|
| 132 | cat > /etc/pam.d/system-auth << "EOF" &&
|
---|
[51dfb3e] | 133 | <literal># Begin /etc/pam.d/system-auth
|
---|
[3706c7fe] | 134 |
|
---|
[51dfb3e] | 135 | auth optional pam_cap.so</literal>
|
---|
[3706c7fe] | 136 | EOF
|
---|
[77554c93] | 137 | tail -n +3 /etc/pam.d/system-auth.bak >> /etc/pam.d/system-auth</userinput></screen>
|
---|
[3706c7fe] | 138 |
|
---|
[47274444] | 139 | <para>
|
---|
| 140 | Additonally, you'll need to modify the
|
---|
| 141 | <filename>/etc/security/capability.conf</filename> file to grant
|
---|
| 142 | necessary privileges to users, and utilize the <command>setcap</command>
|
---|
| 143 | utility to set capabilities on specific utilities as needed. See
|
---|
| 144 | <command>man 8 setcap</command> and
|
---|
| 145 | <command>man 3 cap_from_text</command> for additional information.
|
---|
| 146 | </para>
|
---|
[3706c7fe] | 147 |
|
---|
| 148 | </sect2>
|
---|
| 149 |
|
---|
[e79ed72] | 150 | <sect2 role="content">
|
---|
| 151 | <title>Contents</title>
|
---|
| 152 |
|
---|
| 153 | <segmentedlist>
|
---|
| 154 | <segtitle>Installed Programs</segtitle>
|
---|
[f586237] | 155 | <segtitle>Installed Library</segtitle>
|
---|
[e79ed72] | 156 | <segtitle>Installed Directories</segtitle>
|
---|
| 157 |
|
---|
| 158 | <seglistitem>
|
---|
[f586237] | 159 | <seg>None</seg>
|
---|
| 160 | <seg>pam_cap.so</seg>
|
---|
[e79ed72] | 161 | <seg>None</seg>
|
---|
| 162 | </seglistitem>
|
---|
| 163 | </segmentedlist>
|
---|
| 164 |
|
---|
| 165 | </sect2>
|
---|
| 166 |
|
---|
| 167 | </sect1>
|
---|