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