source: postlfs/security/libcap.xml

trunk
Last change on this file was 9d9ca005, checked in by Thomas Trepl <thomas@…>, 2 months ago

A few tags

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