source: postlfs/security/libcap.xml@ 57b3c45

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 9.1 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 57b3c45 was 57b3c45, checked in by Douglas R. Reno <renodr@…>, 4 years ago

Add a note about rebuilding libcap using the LFS instructions when upgrading.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@22597 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 4.6 KB
RevLine 
[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 " ">
[49cc034]9 <!ENTITY libcap-md5sum "52120c05dc797b01f5a7ae70f4335e96">
10 <!ENTITY libcap-size "97 KB">
[e06e22b]11 <!ENTITY libcap-buildsize "1 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
[f586237]32 <para>The <application>libcap</application> package was installed in
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>).</para>
[33c9d33]36
[d43c7a1]37 &lfs90_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>
[f586237]64 <para role="required">
65 <xref linkend="linux-pam"/>
66 </para>
[03f32bb]67
[e79ed72]68 <para condition="html" role="usernotes">User Notes:
[68876b7]69 <ulink url="&blfs-wiki;/libcap"/></para>
[e79ed72]70
71 </sect2>
72
73 <sect2 role="installation">
[68876b7]74 <title>Installation of libcap</title>
[e79ed72]75
[57b3c45]76 <note>
77 <para>If you are upgrading libcap from a previous version, use the
78 instructions in
79 <ulink url="../../../../lfs/view/development/chapter06/libcap.html">LFS libcap page</ulink>
80 to upgrade libcap. If the PAM module has been built, it will automatically
81 be picked up.</para>
82 </note>
83
[68876b7]84 <para>Install <application>libcap</application> by running the following
[e79ed72]85 commands:</para>
86
[f586237]87<screen><userinput>make -C pam_cap</userinput></screen>
[e79ed72]88
89 <para>This package does not come with a test suite.</para>
[5ec4f2b4]90
[e79ed72]91 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
92
[f586237]93<screen role="root"><userinput>install -v -m755 pam_cap/pam_cap.so /lib/security &amp;&amp;
94install -v -m644 pam_cap/capability.conf /etc/security</userinput></screen>
[e79ed72]95
96 </sect2>
97
[3706c7fe]98 <sect2 role="configuration">
99 <title>Configuring Libcap</title>
100
101 <para>In order to allow <application>Linux-PAM</application> to grant
102 privileges based on POSIX capabilites, you need to add the libcap module
103 to the begining of the <filename>/etc/pam.d/system-auth</filename> file.
104 Make the required edits with the following commands:</para>
105
106<screen role="root"><userinput>mv -v /etc/pam.d/system-auth{,.bak} &amp;&amp;
107cat &gt; /etc/pam.d/system-auth &lt;&lt; "EOF" &amp;&amp;
[51dfb3e]108<literal># Begin /etc/pam.d/system-auth
[3706c7fe]109
[51dfb3e]110auth optional pam_cap.so</literal>
[3706c7fe]111EOF
[77554c93]112tail -n +3 /etc/pam.d/system-auth.bak &gt;&gt; /etc/pam.d/system-auth</userinput></screen>
[3706c7fe]113
114 <para>Additonally, you'll need to modify the
115 <filename>/etc/security/capability.conf</filename> file to grant necessary
[49cc034]116 privileges to users, and utilize the <command>setcap</command>
117 utility to set capabilities on specific utilities as needed. See
[3706c7fe]118 <command>man 8 setcap</command> and <command>man 3 cap_from_text</command>
119 for additional information.</para>
120
121 </sect2>
122
[e79ed72]123 <sect2 role="content">
124 <title>Contents</title>
125
126 <segmentedlist>
127 <segtitle>Installed Programs</segtitle>
[f586237]128 <segtitle>Installed Library</segtitle>
[e79ed72]129 <segtitle>Installed Directories</segtitle>
130
131 <seglistitem>
[f586237]132 <seg>None</seg>
133 <seg>pam_cap.so</seg>
[e79ed72]134 <seg>None</seg>
135 </seglistitem>
136 </segmentedlist>
137
138 </sect2>
139
140</sect1>
Note: See TracBrowser for help on using the repository browser.