mirror of
https://github.com/Zeckmathederg/glfs.git
synced 2025-01-25 07:42:13 +08:00
51dfb3e400
BLFS/branches/old-trunk-20190627 and BLFS/branches/old-bootscripts-20190627. Move BLFS/branches/elogind-book and BLFS/branches/elogind-bootscripts to trunk. git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@21754 af4574ff-66df-0310-9fd7-8a98e5e911e0
133 lines
4.3 KiB
XML
133 lines
4.3 KiB
XML
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
|
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
|
<!ENTITY % general-entities SYSTEM "../../general.ent">
|
|
%general-entities;
|
|
|
|
<!ENTITY libcap-download-http "&kernel-dl;/linux/libs/security/linux-privs/libcap2/libcap-&libcap-version;.tar.xz">
|
|
<!ENTITY libcap-download-ftp " ">
|
|
<!ENTITY libcap-md5sum "2e8f9fab32eb5ccb37969fe317fd17aa">
|
|
<!ENTITY libcap-size "68 KB">
|
|
<!ENTITY libcap-buildsize "620 KB">
|
|
<!ENTITY libcap-time "less than 0.1 SBU">
|
|
]>
|
|
|
|
<sect1 id="libcap-pam" xreflabel="libcap-&libcap-version; with PAM">
|
|
<?dbhtml filename="libcap.html"?>
|
|
|
|
<sect1info>
|
|
<othername>$LastChangedBy$</othername>
|
|
<date>$Date$</date>
|
|
</sect1info>
|
|
|
|
<title>libcap-&libcap-version; with PAM</title>
|
|
|
|
<indexterm zone="libcap-pam">
|
|
<primary sortas="a-libcap-pam">libcap</primary>
|
|
</indexterm>
|
|
|
|
<sect2 role="package">
|
|
<title>Introduction to libcap with PAM</title>
|
|
|
|
<para>The <application>libcap</application> package was installed in
|
|
LFS, but if <application>Linux-PAM</application> support is desired,
|
|
the PAM module must be built (after installation of
|
|
<application>Linux-PAM</application>).</para>
|
|
|
|
&lfs84_checked;
|
|
|
|
<bridgehead renderas="sect3">Package Information</bridgehead>
|
|
<itemizedlist spacing="compact">
|
|
<listitem>
|
|
<para>Download (HTTP): <ulink url="&libcap-download-http;"/></para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>Download (FTP): <ulink url="&libcap-download-ftp;"/></para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>Download MD5 sum: &libcap-md5sum;</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>Download size: &libcap-size;</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>Estimated disk space required: &libcap-buildsize;</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>Estimated build time: &libcap-time;</para>
|
|
</listitem>
|
|
</itemizedlist>
|
|
|
|
<bridgehead renderas="sect3">libcap Dependencies</bridgehead>
|
|
|
|
<bridgehead renderas="sect4">Required</bridgehead>
|
|
<para role="required">
|
|
<xref linkend="linux-pam"/>
|
|
</para>
|
|
|
|
<para condition="html" role="usernotes">User Notes:
|
|
<ulink url="&blfs-wiki;/libcap"/></para>
|
|
|
|
</sect2>
|
|
|
|
<sect2 role="installation">
|
|
<title>Installation of libcap</title>
|
|
|
|
<para>Install <application>libcap</application> by running the following
|
|
commands:</para>
|
|
|
|
<screen><userinput>make -C pam_cap</userinput></screen>
|
|
|
|
<para>This package does not come with a test suite.</para>
|
|
|
|
<para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
|
|
|
<screen role="root"><userinput>install -v -m755 pam_cap/pam_cap.so /lib/security &&
|
|
install -v -m644 pam_cap/capability.conf /etc/security</userinput></screen>
|
|
|
|
</sect2>
|
|
|
|
<sect2 role="configuration">
|
|
<title>Configuring Libcap</title>
|
|
|
|
<para>In order to allow <application>Linux-PAM</application> to grant
|
|
privileges based on POSIX capabilites, you need to add the libcap module
|
|
to the begining of the <filename>/etc/pam.d/system-auth</filename> file.
|
|
Make the required edits with the following commands:</para>
|
|
|
|
<screen role="root"><userinput>mv -v /etc/pam.d/system-auth{,.bak} &&
|
|
cat > /etc/pam.d/system-auth << "EOF" &&
|
|
<literal># Begin /etc/pam.d/system-auth
|
|
|
|
auth optional pam_cap.so</literal>
|
|
EOF
|
|
tail -n +3 /etc/pam.d/system-auth.bak >> /etc/pam.d/system-auth</userinput></screen>
|
|
|
|
<para>Additonally, you'll need to modify the
|
|
<filename>/etc/security/capability.conf</filename> file to grant necessary
|
|
privileges to users, and utilize the <application>setcap</application>
|
|
utiltiy to set capabilities on specific utilities as needed. See
|
|
<command>man 8 setcap</command> and <command>man 3 cap_from_text</command>
|
|
for additional information.</para>
|
|
|
|
</sect2>
|
|
|
|
<sect2 role="content">
|
|
<title>Contents</title>
|
|
|
|
<segmentedlist>
|
|
<segtitle>Installed Programs</segtitle>
|
|
<segtitle>Installed Library</segtitle>
|
|
<segtitle>Installed Directories</segtitle>
|
|
|
|
<seglistitem>
|
|
<seg>None</seg>
|
|
<seg>pam_cap.so</seg>
|
|
<seg>None</seg>
|
|
</seglistitem>
|
|
</segmentedlist>
|
|
|
|
</sect2>
|
|
|
|
</sect1>
|