glfs/postlfs/security/polkit.xml
Bruce Dubbs 82bdecfad0 Tag Xorg and it's dependencies.
Some misc text tweaks.



git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@21982 af4574ff-66df-0310-9fd7-8a98e5e911e0
2019-08-16 22:28:01 +00:00

412 lines
13 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 polkit-download-http
"https://www.freedesktop.org/software/polkit/releases/polkit-&polkit-version;.tar.gz">
<!ENTITY polkit-download-ftp " ">
<!ENTITY polkit-md5sum "4b37258583393e83069a0e2e89c0162a">
<!ENTITY polkit-size "1.5 MB">
<!ENTITY polkit-buildsize "15 MB (with tests)">
<!ENTITY polkit-time "0.4 SBU (with tests)">
]>
<sect1 id="polkit" xreflabel="Polkit-&polkit-version;">
<?dbhtml filename="polkit.html"?>
<sect1info>
<othername>$LastChangedBy$</othername>
<date>$Date$</date>
</sect1info>
<title>Polkit-&polkit-version;</title>
<indexterm zone="polkit">
<primary sortas="a-Polkit">Polkit</primary>
</indexterm>
<sect2 role="package">
<title>Introduction to Polkit</title>
<para>
<application>Polkit</application> is a toolkit for defining and handling
authorizations. It is used for allowing unprivileged processes to
communicate with privileged processes.
</para>
&lfs90_checked;
<bridgehead renderas="sect3">Package Information</bridgehead>
<itemizedlist spacing="compact">
<listitem>
<para>
Download (HTTP): <ulink url="&polkit-download-http;"/>
</para>
</listitem>
<listitem>
<para>
Download (FTP): <ulink url="&polkit-download-ftp;"/>
</para>
</listitem>
<listitem>
<para>
Download MD5 sum: &polkit-md5sum;
</para>
</listitem>
<listitem>
<para>
Download size: &polkit-size;
</para>
</listitem>
<listitem>
<para>
Estimated disk space required: &polkit-buildsize;
</para>
</listitem>
<listitem>
<para>
Estimated build time: &polkit-time;
</para>
</listitem>
</itemizedlist>
<bridgehead renderas="sect3" revision="sysv">Additional Downloads</bridgehead>
<itemizedlist spacing="compact" revision="sysv">
<listitem>
<para>
Recommended patch:
<ulink url="&patch-root;/polkit-&polkit-version;-fix_elogind_detection-1.patch"/>
</para>
</listitem>
</itemizedlist>
<bridgehead renderas="sect3">Polkit Dependencies</bridgehead>
<bridgehead renderas="sect4">Required</bridgehead>
<para role="required">
<xref linkend="glib2"/> and
<xref linkend="js60"/>
</para>
<bridgehead renderas="sect4">Recommended</bridgehead>
<para role="recommended">
<xref linkend="linux-pam"/><phrase revision="sysv"> and
<xref linkend="elogind"/></phrase>
</para>
<note>
<para>
Since <phrase revision="sysv"><command>elogind</command></phrase>
<phrase revision="systemd"><command>systemd-logind</command></phrase>
uses PAM to register user sessions, it is a good idea to build
<application>Polkit</application> with PAM support so
<phrase revision="sysv"><command>elogind</command></phrase>
<phrase revision="systemd"><command>systemd-logind</command></phrase>
can track <application>Polkit</application> sessions.
</para>
</note>
<bridgehead renderas="sect4">Optional (Required if building GNOME)</bridgehead>
<para role="optional">
<xref linkend="gobject-introspection"/>
</para>
<bridgehead renderas="sect4">Optional</bridgehead>
<para role="optional">
<xref linkend="DocBook"/>,
<xref linkend="docbook-xsl"/>,
<xref linkend="gtk-doc"/>, and
<xref linkend="libxslt"/>
</para>
<bridgehead renderas="sect4" revision="systemd">Required Runtime Dependencies</bridgehead>
<para role="required" revision="systemd">
<xref role="runtime" linkend="systemd"/>
</para>
<note>
<para>
If <xref linkend="libxslt"/> is installed,
then <xref linkend="DocBook"/> and <xref linkend="docbook-xsl"/> are
required. If you have installed <xref linkend="libxslt"/>, but you do
not want to install any of the DocBook packages mentioned, you will
need to use <option>--disable-man-pages</option> in the instructions
below.
</para>
</note>
<para condition="html" role="usernotes">User Notes:
<ulink url="&blfs-wiki;/polkit"/>
</para>
</sect2>
<sect2 role="installation">
<title>Installation of Polkit</title>
<para>
There should be a dedicated user and group to take control
of the <command>polkitd</command> daemon after it is
started. Issue the following commands as the
<systemitem class="username">root</systemitem> user:
</para>
<screen role="root"><userinput>groupadd -fg 27 polkitd &amp;&amp;
useradd -c "PolicyKit Daemon Owner" -d /etc/polkit-1 -u 27 \
-g polkitd -s /bin/false polkitd</userinput></screen>
<note revision="systemd">
<para>
When building <application>Polkit</application> with
<application>systemd</application> logind support, the
<command>configure</command> script explicitly checks if
system is booted using <application>systemd</application>.
This can cause problems if building the package in chroot,
where the <command>configure</command> would fail to
detect <application>systemd</application>. To workaround
the problem, simply run the following command:
</para>
<screen><userinput>sed -i "s:/sys/fs/cgroup/systemd/:/sys:g" configure</userinput></screen>
</note>
<para revision="sysv">
Fix an issue introduced in recent <application>Polkit</application>
realeases with elogind:
</para>
<screen revision="sysv"><userinput>patch -Np1 -i ../polkit-&polkit-version;-fix_elogind_detection-1.patch &amp;&amp;
autoreconf -fi</userinput></screen>
<para>
Install <application>Polkit</application> by running the following
commands:
</para>
<screen revision="systemd"><userinput>./configure --prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--disable-static \
--with-os-type=LFS &amp;&amp;
make</userinput></screen>
<screen revision="sysv"><userinput>./configure --prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--disable-static \
--with-os-type=LFS \
--enable-libsystemd-login=no &amp;&amp;
make</userinput></screen>
<para>
To test the results, issue: <command>make check</command>.
Note that system <application>D-Bus</application> daemon
must be running for the testsuite to complete.
</para>
<para>
Now, as the <systemitem class="username">root</systemitem> user:
</para>
<screen role="root"><userinput>make install</userinput></screen>
</sect2>
<sect2 role="commands">
<title>Command Explanations</title>
<para>
<option>--with-authfw=shadow</option>: This switch enables the
package to use the <application>Shadow</application> rather than the
<application>Linux PAM</application> Authentication framework. Use it
if you have not installed <application>Linux PAM</application>.
</para>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
href="../../xincludes/static-libraries.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
href="../../xincludes/gtk-doc-rebuild.xml"/>
<para revision="sysv">
<parameter>--enable-libsystemd-login=no</parameter>: This switch forces
polkit to build with elogind support (if available) rather than systemd.
</para>
</sect2>
<sect2 role="configuration">
<title>Configuring Polkit</title>
<sect3>
<title>PAM Configuration</title>
<note>
<para>
If you did not build <application>Polkit</application> with
<application>Linux PAM</application> support, you can skip this section.
</para>
</note>
<para>
If you have built <application>Polkit</application> with
<application>Linux PAM</application> support, you need to modify
the default PAM configuration file which was installed by default to get
<application>Polkit</application> to work correctly with BLFS. Issue the
following commands as the <systemitem class="username">root</systemitem>
user to create the configuration file for <application>Linux PAM</application>:
</para>
<screen role="root"><userinput>cat &gt; /etc/pam.d/polkit-1 &lt;&lt; "EOF"
<literal># Begin /etc/pam.d/polkit-1
auth include system-auth
account include system-account
password include system-password
session include system-session
# End /etc/pam.d/polkit-1</literal>
EOF</userinput></screen>
</sect3>
</sect2>
<sect2 role="content">
<title>Contents</title>
<segmentedlist>
<segtitle>Installed Programs</segtitle>
<segtitle>Installed Libraries</segtitle>
<segtitle>Installed Directories</segtitle>
<seglistitem>
<seg>
pkaction, pkcheck, pk-example-frobnicate, pkexec,
pkttyagent and polkitd
</seg>
<seg>
libpolkit-agent-1.so and
libpolkit-gobject-1.so
</seg>
<seg>
/etc/polkit-1,
/usr/include/polkit-1,
/usr/lib/polkit-1,
/usr/share/gtk-doc/html/polkit-1 and
/usr/share/polkit-1
</seg>
</seglistitem>
</segmentedlist>
<variablelist>
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
<?dbfo list-presentation="list"?>
<?dbhtml list-presentation="table"?>
<varlistentry id="pkaction">
<term><command>pkaction</command></term>
<listitem>
<para>
is used to obtain information about registered PolicyKit actions.
</para>
<indexterm zone="polkit pkaction">
<primary sortas="b-pkaction">pkaction</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="pkcheck">
<term><command>pkcheck</command></term>
<listitem>
<para>
is used to check whether a process is authorized for action.
</para>
<indexterm zone="polkit pkcheck">
<primary sortas="b-pkcheck">pkcheck</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="pk-example-frobnicate">
<term><command>pk-example-frobnicate</command></term>
<listitem>
<para>
is an example program to test the <command>pkexec</command>
command.
</para>
<indexterm zone="polkit pk-example-frobnicate">
<primary sortas="b-pk-example-frobnicate">pk-example-frobnicate</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="pkexec">
<term><command>pkexec</command></term>
<listitem>
<para>
allows an authorized user to execute a command as another user.
</para>
<indexterm zone="polkit pkexec">
<primary sortas="b-pkexec">pkexec</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="pkttyagent">
<term><command>pkttyagent</command></term>
<listitem>
<para>
is used to start a textual authentication agent for the subject.
</para>
<indexterm zone="polkit pkttyagent">
<primary sortas="b-pkttyagent">pkttyagent</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="polkitd">
<term><command>polkitd</command></term>
<listitem>
<para>
provides the org.freedesktop.PolicyKit1 <application>D-Bus</application>
service on the system message bus.
</para>
<indexterm zone="polkit polkitd">
<primary sortas="b-polkitd">polkitd</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="libpolkit-agent-1">
<term><filename class='libraryfile'>libpolkit-agent-1.so</filename></term>
<listitem>
<para>
contains the <application>Polkit</application> authentication
agent API functions.
</para>
<indexterm zone="polkit libpolkit-agent-1">
<primary sortas="c-libpolkit-agent-1">libpolkit-agent-1.so</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="libpolkit-gobject-1">
<term><filename class='libraryfile'>libpolkit-gobject-1.so</filename></term>
<listitem>
<para>
contains the <application>Polkit</application> authorization API functions.
</para>
<indexterm zone="polkit libpolkit-gobject-1">
<primary sortas="c-libpolkit-gobject-1">libpolkit-gobject-1.so</primary>
</indexterm>
</listitem>
</varlistentry>
</variablelist>
</sect2>
</sect1>