source: postlfs/security/polkit.xml@ b5689ba

elogind
Last change on this file since b5689ba was cf4e047, checked in by DJ Lucas <dj@…>, 5 years ago

Added elogind support to Pulseaudio.
Text cleanups to elogind additions.

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

  • Property mode set to 100644
File size: 13.0 KB
RevLine 
[9d3d8a8]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
[0d7900a]7 <!ENTITY polkit-download-http
[6d03f3e]8 "https://www.freedesktop.org/software/polkit/releases/polkit-&polkit-version;.tar.gz">
[9d3d8a8]9 <!ENTITY polkit-download-ftp " ">
[3b40dbb3]10 <!ENTITY polkit-md5sum "f03b055d6ae5fc8eac76838c7d83d082">
[6d03f3e]11 <!ENTITY polkit-size "1.5 MB">
[3b40dbb3]12 <!ENTITY polkit-buildsize "148 MB (with tests)">
13 <!ENTITY polkit-time "0.4 SBU (with tests)">
[9d3d8a8]14]>
15
[01996ebb]16<sect1 id="polkit" xreflabel="Polkit-&polkit-version;">
[9d3d8a8]17 <?dbhtml filename="polkit.html"?>
18
19 <sect1info>
20 <othername>$LastChangedBy$</othername>
21 <date>$Date$</date>
22 </sect1info>
23
[01996ebb]24 <title>Polkit-&polkit-version;</title>
[9d3d8a8]25
26 <indexterm zone="polkit">
[01996ebb]27 <primary sortas="a-Polkit">Polkit</primary>
[9d3d8a8]28 </indexterm>
29
30 <sect2 role="package">
[01996ebb]31 <title>Introduction to Polkit</title>
[9d3d8a8]32
[b84342d6]33 <para>
[01996ebb]34 <application>Polkit</application> is a toolkit for defining and handling
[9ca304a]35 authorizations. It is used for allowing unprivileged processes to
[30f82900]36 communicate with privileged processes.
[b84342d6]37 </para>
[9d3d8a8]38
[a509a18]39 &lfs83_checked;
[27e62762]40
[9d3d8a8]41 <bridgehead renderas="sect3">Package Information</bridgehead>
42 <itemizedlist spacing="compact">
43 <listitem>
[b84342d6]44 <para>
45 Download (HTTP): <ulink url="&polkit-download-http;"/>
46 </para>
[9d3d8a8]47 </listitem>
48 <listitem>
[b84342d6]49 <para>
50 Download (FTP): <ulink url="&polkit-download-ftp;"/>
51 </para>
[9d3d8a8]52 </listitem>
53 <listitem>
[b84342d6]54 <para>
55 Download MD5 sum: &polkit-md5sum;
56 </para>
[9d3d8a8]57 </listitem>
58 <listitem>
[b84342d6]59 <para>
60 Download size: &polkit-size;
61 </para>
[9d3d8a8]62 </listitem>
63 <listitem>
[b84342d6]64 <para>
65 Estimated disk space required: &polkit-buildsize;
66 </para>
[9d3d8a8]67 </listitem>
68 <listitem>
[b84342d6]69 <para>
70 Estimated build time: &polkit-time;
71 </para>
[9d3d8a8]72 </listitem>
73 </itemizedlist>
74
[3b40dbb3]75 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
76 <itemizedlist spacing="compact">
77 <listitem>
78 <para>
79 Required patch:
[8fbbc96f]80 <ulink url="&patch-root;/polkit-&polkit-version;-security_patch-2.patch"/>
[3b40dbb3]81 </para>
82 </listitem>
[4ef4636b]83 <listitem revision="sysv">
84 <para>
[cf4e047]85 Reecommended patch:
[4ef4636b]86 <ulink url="&patch-root;/polkit-&polkit-version;-elogind-1.patch"/>
87 </para>
88 </listitem>
[3b40dbb3]89 </itemizedlist>
90
[01996ebb]91 <bridgehead renderas="sect3">Polkit Dependencies</bridgehead>
[9d3d8a8]92
93 <bridgehead renderas="sect4">Required</bridgehead>
[bb947c32]94 <para role="required">
[6d03f3e]95 <xref linkend="glib2"/> and
96 <xref linkend="js52"/>
[4c2be438]97 </para>
98
[4ef4636b]99 <bridgehead renderas="sect4">Recommended</bridgehead>
100 <para role="recommended">
[cf4e047]101 <xref linkend="linux-pam"/><phrase revision="sysv"> and
102 <xref linkend="elogind"/></phrase>
[f586237]103 </para>
104
[4ef4636b]105 <note>
[f586237]106 <para>
[4ef4636b]107 Since <phrase revision="sysv"><command>elogind</command></phrase>
108 <phrase revision="systemd"><command>systemd-logind</command></phrase>
109 uses PAM to register user sessions, it is a good idea to build
110 <application>Polkit</application> with PAM support so
111 <phrase revision="sysv"><command>elogind</command></phrase>
112 <phrase revision="systemd"><command>systemd-logind</command></phrase>
113 can track <application>Polkit</application> sessions.
[f586237]114 </para>
115 </note>
116
117
[4c2be438]118 <bridgehead renderas="sect4">Optional (Required if building GNOME)</bridgehead>
119 <para role="optional">
120 <xref linkend="gobject-introspection"/>
121 </para>
[9d3d8a8]122
123 <bridgehead renderas="sect4">Optional</bridgehead>
[bb947c32]124 <para role="optional">
[0d7900a]125 <xref linkend="DocBook"/>,
126 <xref linkend="docbook-xsl"/>,
[4ef4636b]127 <xref linkend="gtk-doc"/>, and
128 <xref linkend="libxslt"/>
[f586237]129 </para>
130
[4ef4636b]131 <bridgehead renderas="sect4">Required Runtime Dependencies</bridgehead>
132 <para role="required">
133 <phrase revision="sysv"><xref role="runtime" linkend="elogind"/></phrase>
134 <phrase revision="systemd"><xref role="runtime" linkend="systemd"/></phrase>
[4c2be438]135 </para>
[875b4070]136
137 <note>
[b84342d6]138 <para>
[f586237]139 If <xref linkend="libxslt"/> is installed,
140 then <xref linkend="DocBook"/> and <xref linkend="docbook-xsl"/> are
141 required. If you have installed <xref linkend="libxslt"/>, but you do
142 not want to install any of the DocBook packages mentioned, you will
143 need to use <option>--disable-man-pages</option> in the instructions
144 below.
[b84342d6]145 </para>
[875b4070]146 </note>
[9d3d8a8]147
148 <para condition="html" role="usernotes">User Notes:
[37aba7f]149 <ulink url="&blfs-wiki;/polkit"/>
150 </para>
[9d3d8a8]151 </sect2>
152
153 <sect2 role="installation">
[01996ebb]154 <title>Installation of Polkit</title>
[9d3d8a8]155
[b84342d6]156 <para>
[01996ebb]157 There should be a dedicated user and group to take control
158 of the <command>polkitd</command> daemon after it is
159 started. Issue the following commands as the
160 <systemitem class="username">root</systemitem> user:
161 </para>
162
163<screen role="root"><userinput>groupadd -fg 27 polkitd &amp;&amp;
164useradd -c "PolicyKit Daemon Owner" -d /etc/polkit-1 -u 27 \
165 -g polkitd -s /bin/false polkitd</userinput></screen>
166
[f586237]167 <note revision="systemd">
168 <para>
169 When building <application>Polkit</application> with
170 <application>systemd</application> logind support, the
171 <command>configure</command> script explicitly checks if
172 system is booted using <application>systemd</application>.
173 This can cause problems if building the package in chroot,
174 where the <command>configure</command> would fail to
175 detect <application>systemd</application>. To workaround
176 the problem, simply run the following command:
177 </para>
178
179<screen><userinput>sed -i "s:/sys/fs/cgroup/systemd/:/sys:g" configure</userinput></screen>
180 </note>
[3b40dbb3]181
182 <para>
183 Apply a security patch from upstream:
184 </para>
185
[8fbbc96f]186<screen><userinput>patch -Np1 -i ../polkit-&polkit-version;-security_patch-2.patch</userinput></screen>
[6d03f3e]187
[4ef4636b]188 <para revision="sysv">
189 Apply a patch to fix issues with elogind:
190 </para>
191
192<screen revision="sysv"><userinput>patch -Np1 -i ../polkit-0.115-elogind-1.patch &amp;&amp;
193autoreconf -fi</userinput></screen>
194
[01996ebb]195 <para>
196 Install <application>Polkit</application> by running the following
[37aba7f]197 commands:
[b84342d6]198 </para>
[9d3d8a8]199
[4ef4636b]200<screen><userinput>./configure --prefix=/usr \
[d278ced]201 --sysconfdir=/etc \
202 --localstatedir=/var \
203 --disable-static &amp;&amp;
[f586237]204make</userinput></screen>
205
[b84342d6]206 <para>
[01996ebb]207 To test the results, issue: <command>make check</command>.
[3bbf74c5]208 Note that system <application>D-Bus</application> daemon
[3b40dbb3]209 must be running for the testsuite to complete. One tests fails
210 due to the security patch.
[b84342d6]211 </para>
[9d3d8a8]212
[b84342d6]213 <para>
214 Now, as the <systemitem class="username">root</systemitem> user:
215 </para>
[9d3d8a8]216
217<screen role="root"><userinput>make install</userinput></screen>
218
219 </sect2>
220
221 <sect2 role="commands">
222 <title>Command Explanations</title>
223
[4ef4636b]224 <para>
[f586237]225 <option>--with-authfw=shadow</option>: This switch enables the
226 package to use the <application>Shadow</application> rather than the
227 <application>Linux PAM</application> Authentication framework. Use it
228 if you have not installed <application>Linux PAM</application>.
[b84342d6]229 </para>
230
231 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
232 href="../../xincludes/static-libraries.xml"/>
[875b4070]233
[e05cd03f]234 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
[b84342d6]235 href="../../xincludes/gtk-doc-rebuild.xml"/>
[9d3d8a8]236
237 </sect2>
238
[a6bd736]239 <sect2 role="configuration">
[01996ebb]240 <title>Configuring Polkit</title>
[a6bd736]241
242 <sect3>
243 <title>PAM Configuration</title>
244
245 <note>
[b84342d6]246 <para>
[01996ebb]247 If you did not build <application>Polkit</application> with
[b84342d6]248 <application>Linux PAM</application> support, you can skip this section.
[a6bd736]249 </para>
250 </note>
251
[b84342d6]252 <para>
[0d7900a]253 If you have built <application>Polkit</application> with
254 <application>Linux PAM</application> support, you need to modify
[9ca304a]255 the default PAM configuration file which was installed by default to get
256 <application>Polkit</application> to work correctly with BLFS. Issue the
257 following commands as the <systemitem class="username">root</systemitem>
[b84342d6]258 user to create the configuration file for <application>Linux PAM</application>:
[a6bd736]259 </para>
260
261<screen role="root"><userinput>cat &gt; /etc/pam.d/polkit-1 &lt;&lt; "EOF"
262<literal># Begin /etc/pam.d/polkit-1
263
264auth include system-auth
265account include system-account
266password include system-password
267session include system-session
268
269# End /etc/pam.d/polkit-1</literal>
270EOF</userinput></screen>
271
272 </sect3>
273
274 </sect2>
275
[9d3d8a8]276 <sect2 role="content">
277 <title>Contents</title>
278
279 <segmentedlist>
280 <segtitle>Installed Programs</segtitle>
281 <segtitle>Installed Libraries</segtitle>
282 <segtitle>Installed Directories</segtitle>
283
284 <seglistitem>
[b84342d6]285 <seg>
[f342c0a9]286 pkaction, pkcheck, pk-example-frobnicate, pkexec,
287 pkttyagent and polkitd
[b84342d6]288 </seg>
289 <seg>
[0d7900a]290 libpolkit-agent-1.so and
[b84342d6]291 libpolkit-gobject-1.so
292 </seg>
[028759b]293 <seg>
[01996ebb]294 /etc/polkit-1,
295 /usr/include/polkit-1,
296 /usr/lib/polkit-1,
297 /usr/share/gtk-doc/html/polkit-1 and
[028759b]298 /usr/share/polkit-1
[b84342d6]299 </seg>
[9d3d8a8]300 </seglistitem>
301 </segmentedlist>
302
303 <variablelist>
304 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
305 <?dbfo list-presentation="list"?>
306 <?dbhtml list-presentation="table"?>
307
308 <varlistentry id="pkaction">
309 <term><command>pkaction</command></term>
310 <listitem>
[b84342d6]311 <para>
312 is used to obtain information about registered PolicyKit actions.
313 </para>
[9d3d8a8]314 <indexterm zone="polkit pkaction">
315 <primary sortas="b-pkaction">pkaction</primary>
316 </indexterm>
317 </listitem>
318 </varlistentry>
319
320 <varlistentry id="pkcheck">
321 <term><command>pkcheck</command></term>
322 <listitem>
[b84342d6]323 <para>
324 is used to check whether a process is authorized for action.
325 </para>
[9d3d8a8]326 <indexterm zone="polkit pkcheck">
327 <primary sortas="b-pkcheck">pkcheck</primary>
328 </indexterm>
329 </listitem>
330 </varlistentry>
331
[72d90b67]332 <varlistentry id="pk-example-frobnicate">
333 <term><command>pk-example-frobnicate</command></term>
334 <listitem>
335 <para>
336 is an example program to test the <command>pkexec</command>
337 command.
338 </para>
339 <indexterm zone="polkit pk-example-frobnicate">
340 <primary sortas="b-pk-example-frobnicate">pk-example-frobnicate</primary>
341 </indexterm>
342 </listitem>
343 </varlistentry>
344
[9d3d8a8]345 <varlistentry id="pkexec">
346 <term><command>pkexec</command></term>
347 <listitem>
[b84342d6]348 <para>
349 allows an authorized user to execute a command as another user.
350 </para>
[9d3d8a8]351 <indexterm zone="polkit pkexec">
352 <primary sortas="b-pkexec">pkexec</primary>
353 </indexterm>
354 </listitem>
355 </varlistentry>
356
[b84342d6]357 <varlistentry id="pkttyagent">
358 <term><command>pkttyagent</command></term>
[9d3d8a8]359 <listitem>
[b84342d6]360 <para>
361 is used to start a textual authentication agent for the subject.
362 </para>
363 <indexterm zone="polkit pkttyagent">
364 <primary sortas="b-pkttyagent">pkttyagent</primary>
[9d3d8a8]365 </indexterm>
366 </listitem>
[b84342d6]367 </varlistentry>
[9d3d8a8]368
[875b4070]369 <varlistentry id="polkitd">
[9d3d8a8]370 <term><command>polkitd</command></term>
371 <listitem>
[b84342d6]372 <para>
[0d7900a]373 provides the org.freedesktop.PolicyKit1 <application>D-Bus</application>
[b84342d6]374 service on the system message bus.
375 </para>
[875b4070]376 <indexterm zone="polkit polkitd">
[9d3d8a8]377 <primary sortas="b-polkitd">polkitd</primary>
378 </indexterm>
379 </listitem>
380 </varlistentry>
381
382 <varlistentry id="libpolkit-agent-1">
[b84342d6]383 <term><filename class='libraryfile'>libpolkit-agent-1.so</filename></term>
[9d3d8a8]384 <listitem>
[b84342d6]385 <para>
[01996ebb]386 contains the <application>Polkit</application> authentication
[b84342d6]387 agent API functions.
388 </para>
[9d3d8a8]389 <indexterm zone="polkit libpolkit-agent-1">
[b84342d6]390 <primary sortas="c-libpolkit-agent-1">libpolkit-agent-1.so</primary>
[9d3d8a8]391 </indexterm>
392 </listitem>
393 </varlistentry>
394
395 <varlistentry id="libpolkit-gobject-1">
[b84342d6]396 <term><filename class='libraryfile'>libpolkit-gobject-1.so</filename></term>
[9d3d8a8]397 <listitem>
[b84342d6]398 <para>
[01996ebb]399 contains the <application>Polkit</application> authorization API functions.
[b84342d6]400 </para>
[9d3d8a8]401 <indexterm zone="polkit libpolkit-gobject-1">
[b84342d6]402 <primary sortas="c-libpolkit-gobject-1">libpolkit-gobject-1.so</primary>
[9d3d8a8]403 </indexterm>
404 </listitem>
405 </varlistentry>
406
407 </variablelist>
408
409 </sect2>
410
411</sect1>
Note: See TracBrowser for help on using the repository browser.