source: postlfs/security/polkit.xml@ 7e280b45

11.1 11.2 11.3 12.0 12.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 xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 7e280b45 was 7e280b45, checked in by Xi Ruoyao <xry111@…>, 2 years ago

polkit: add patch to fix CVE-2021-4034 (#16012)

  • Property mode set to 100644
File size: 16.1 KB
Line 
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
7 <!ENTITY polkit-download-http "https://www.freedesktop.org/software/polkit/releases/polkit-&polkit-version;.tar.gz">
8 <!ENTITY polkit-download-ftp " ">
9 <!ENTITY polkit-md5sum "a6efe21d021fafe4191ee30331ef801c">
10 <!ENTITY polkit-size "1.6 MB">
11 <!ENTITY polkit-buildsize "12 MB">
12 <!ENTITY polkit-time "0.1 SBU (Using parallelism=4)">
13]>
14
15<sect1 id="polkit" xreflabel="Polkit-&polkit-version;">
16 <?dbhtml filename="polkit.html"?>
17
18 <sect1info>
19 <date>$Date$</date>
20 </sect1info>
21
22 <title>Polkit-&polkit-version;</title>
23
24 <indexterm zone="polkit">
25 <primary sortas="a-Polkit">Polkit</primary>
26 </indexterm>
27
28 <sect2 role="package">
29 <title>Introduction to Polkit</title>
30
31 <para>
32 <application>Polkit</application> is a toolkit for defining and handling
33 authorizations. It is used for allowing unprivileged processes to
34 communicate with privileged processes.
35 </para>
36
37 &lfs110a_checked;
38
39 <bridgehead renderas="sect3">Package Information</bridgehead>
40 <itemizedlist spacing="compact">
41 <listitem>
42 <para>
43 Download (HTTP): <ulink url="&polkit-download-http;"/>
44 </para>
45 </listitem>
46 <listitem>
47 <para>
48 Download (FTP): <ulink url="&polkit-download-ftp;"/>
49 </para>
50 </listitem>
51 <listitem>
52 <para>
53 Download MD5 sum: &polkit-md5sum;
54 </para>
55 </listitem>
56 <listitem>
57 <para>
58 Download size: &polkit-size;
59 </para>
60 </listitem>
61 <listitem>
62 <para>
63 Estimated disk space required: &polkit-buildsize;
64 </para>
65 </listitem>
66 <listitem>
67 <para>
68 Estimated build time: &polkit-time;
69 </para>
70 </listitem>
71 </itemizedlist>
72
73 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
74 <itemizedlist spacing="compact">
75 <listitem>
76 <para>
77 Required patch:
78 <ulink url="&patch-root;/polkit-&polkit-version;-security_fix-1.patch"/>
79 </para>
80 </listitem>
81 </itemizedlist>
82
83 <bridgehead renderas="sect3">Polkit Dependencies</bridgehead>
84
85 <bridgehead renderas="sect4">Required</bridgehead>
86 <para role="required">
87 <xref linkend="glib2"/> and
88 <xref linkend="js78"/>
89 </para>
90
91 <bridgehead renderas="sect4">Recommended</bridgehead>
92 <para role="recommended">
93 <xref linkend="gobject-introspection"/>,
94 <xref linkend="libxslt"/>,
95 <xref linkend="linux-pam"/>
96 <phrase revision="sysv">
97 and <xref role="first" linkend="elogind"/>
98 </phrase>
99 </para>
100
101 <note>
102 <para>
103 Since <phrase revision="sysv"><command>elogind</command></phrase>
104 <phrase revision="systemd"><command>systemd-logind</command></phrase>
105 uses PAM to register user sessions, it is a good idea to build
106 <application>Polkit</application> with PAM support so
107 <phrase revision="sysv"><command>elogind</command></phrase>
108 <phrase revision="systemd"><command>systemd-logind</command></phrase>
109 can track <application>Polkit</application> sessions.
110 </para>
111 </note>
112
113
114 <!-- Due to the fact that meson will not autodetect g-i and
115 has it set to required unless you pass an option, and the likelihood
116 of users ignoring a command explanation and then sending in mails
117 regarding KDE or GNOME not working after installing polkit, let's move
118 it to recommended. See #15640 for logic
119 <bridgehead renderas="sect4">Optional (Required if building GNOME)</bridgehead>
120 <para role="optional">
121 <xref linkend="gobject-introspection"/>
122 </para>
123 -->
124
125 <bridgehead renderas="sect4">Optional</bridgehead>
126 <para role="optional">
127 <xref linkend="dbus-python"/> and
128 <xref linkend="python-dbusmock"/> (for tests), and
129 <!--<xref linkend="DocBook"/>, (Part of libxslt's chain)
130 <xref linkend="docbook-xsl"/>,-->
131 <xref linkend="gtk-doc"/>
132 </para>
133
134 <bridgehead renderas="sect4" revision="systemd">Required Runtime Dependencies</bridgehead>
135 <para role="required" revision="systemd">
136 <xref role="runtime" linkend="systemd"/>
137 </para>
138
139 <bridgehead renderas="sect4" id="polkit-agent" xreflabel="Polkit Authentication Agent">
140 Optional Runtime Dependencies
141 </bridgehead>
142 <para role="optional">
143 One polkit authentication agent for using polkit in the graphical
144 environment:
145 <application>polkit-kde-agent</application> in
146 <xref role="runtime" linkend="plasma5-build"/> for KDE,
147 the agent built in
148 <xref role="runtime" linkend="gnome-shell"/> for GNOME3,
149 <xref role="runtime" linkend="polkit-gnome"/> for XFCE, and
150 <application>lxpolkit</application> in
151 <xref role="runtime" linkend="lxsession"/> for LXDE.
152 </para>
153
154 <note>
155 <para>
156 If <xref linkend="libxslt"/> is installed,
157 then <xref linkend="DocBook"/> and <xref linkend="docbook-xsl"/> are
158 required. If you have installed <xref linkend="libxslt"/>, but you do
159 not want to install any of the DocBook packages mentioned, you will
160 need to use <option>-Dman=false</option> in the instructions
161 below.
162 </para>
163 </note>
164
165 <para condition="html" role="usernotes">User Notes:
166 <ulink url="&blfs-wiki;/polkit"/>
167 </para>
168 </sect2>
169
170 <sect2 role="installation">
171 <title>Installation of Polkit</title>
172
173 <para>
174 There should be a dedicated user and group to take control
175 of the <command>polkitd</command> daemon after it is
176 started. Issue the following commands as the
177 <systemitem class="username">root</systemitem> user:
178 </para>
179
180<screen role="root"><userinput>groupadd -fg 27 polkitd &amp;&amp;
181useradd -c "PolicyKit Daemon Owner" -d /etc/polkit-1 -u 27 \
182 -g polkitd -s /bin/false polkitd</userinput></screen>
183
184<!-- All of this is irrelevant with meson
185 <note revision="systemd">
186 <para>
187 When building <application>Polkit</application> with
188 <application>systemd</application> logind support, the
189 <command>configure</command> script explicitly checks if
190 system is booted using <application>systemd</application>.
191 This can cause problems if building the package in chroot,
192 where the <command>configure</command> would fail to
193 detect <application>systemd</application>. To workaround
194 the problem, simply run the following command:
195 </para>
196
197<screen><userinput>sed -i "s:/sys/fs/cgroup/systemd/:/sys:g" configure</userinput></screen>
198 </note>
199
200 <para revision="sysv">
201 Fix an issue introduced in recent <application>Polkit</application>
202 releases with elogind:
203 </para>
204
205<screen revision="sysv"><userinput>patch -Np1 -i ../polkit-&polkit-version;-fix_elogind_detection-1.patch &amp;&amp;
206autoreconf -fv</userinput></screen>
207-->
208
209 <para>
210 First, fix problems with setting permissions during installation and with
211 meson-0.60.0:
212 </para>
213
214<screen><userinput remap="pre">sed '/0,/s/^/#/' -i meson_post_install.py &amp;&amp;
215sed '/policy,/d' -i actions/meson.build \
216 -i src/examples/meson.build</userinput></screen>
217
218 <para>
219 Apply a patch to fix a security issue:
220 </para>
221
222<screen><userinput remap="pre">patch -Np1 -i ../polkit-&polkit-version;-security_fix-1.patch</userinput></screen>
223
224 <para>
225 Install <application>Polkit</application> by running the following
226 commands:
227 </para>
228
229<screen revision="systemd"><userinput>mkdir build &amp;&amp;
230cd build &amp;&amp;
231
232meson --prefix=/usr \
233 -Dman=true \
234 -Dsession_tracking=libsystemd-login \
235 --buildtype=release \
236 .. &amp;&amp;
237ninja</userinput></screen>
238
239<screen revision="sysv"><userinput>mkdir build &amp;&amp;
240cd build &amp;&amp;
241
242meson --prefix=/usr \
243 -Dman=true \
244 -Dsession_tracking=libelogind \
245 -Dsystemdsystemunitdir=/tmp \
246 --buildtype=release \
247 .. &amp;&amp;
248ninja</userinput></screen>
249
250<!--
251 <para>
252 To test the results, first ensure that the system
253 <application>D-Bus</application> daemon is running.
254 Then run <command>make check</command>.
255 </para>
256-->
257
258<!-- The subprojects directory which contains a wrapper for 'mocklibc'
259 is not shipped in the tarball like it should be. Whenever that is
260 fixed, -Dtests=true and ninja test is the ticket. -->
261
262 <para>
263 This package does not ship with a working test suite.
264 </para>
265
266 <para>
267 Now, as the <systemitem class="username">root</systemitem> user:
268 </para>
269
270<screen role="root" revision="systemd"><userinput>ninja install</userinput></screen>
271
272<screen role="root" revision="sysv"><userinput>ninja install &amp;&amp;
273rm -v /tmp/*.service</userinput></screen>
274
275 </sect2>
276
277 <sect2 role="commands">
278 <title>Command Explanations</title>
279
280 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
281 href="../../xincludes/meson-buildtype-release.xml"/>
282
283 <!--
284 <para revision="sysv">
285 <parameter>- -disable-libsystemd-login</parameter>: This switch forces
286 polkit to build with elogind support (if available) rather than
287 systemd-logind.
288 </para>
289
290
291 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
292 href="../../xincludes/static-libraries.xml"/>
293 -->
294
295 <para>
296 <option>-Dauthfw=shadow</option>: This switch enables the
297 package to use the <application>Shadow</application> rather than the
298 <application>Linux PAM</application> Authentication framework. Use it
299 if you have not installed <application>Linux PAM</application>.
300 </para>
301
302 <!--
303 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
304 href="../../xincludes/gtk-doc-rebuild.xml"/>
305 -->
306
307 <para>
308 <option>-Dintrospection=false</option>: Use this option if you are certain
309 that you do not need gobject-introspection files for polkit, or do not have
310 gobject-introspection installed.
311 </para>
312
313 <para>
314 <option>-Dman=false</option>: Use this option to disable generating and
315 installing manual pages. This is useful if libxslt is not installed.
316 </para>
317
318 <para>
319 <option>-Dexamples=true</option>: Use this option to build the example
320 programs.
321 </para>
322
323 <para>
324 <option>-Dgtk_doc=true</option>: Use this option to enable building and
325 installing the API documentation.
326 </para>
327
328 </sect2>
329
330 <sect2 role="configuration">
331 <title>Configuring Polkit</title>
332
333 <sect3>
334 <title>PAM Configuration</title>
335
336 <note>
337 <para>
338 If you did not build <application>Polkit</application> with
339 <application>Linux PAM</application> support, you can skip this
340 section.
341 </para>
342 </note>
343
344 <para>
345 If you have built <application>Polkit</application> with
346 <application>Linux PAM</application> support, you need to modify
347 the default PAM configuration file which was installed by default to get
348 <application>Polkit</application> to work correctly with BLFS. Issue the
349 following commands as the <systemitem class="username">root</systemitem>
350 user to create the configuration file for <application>Linux PAM</application>:
351 </para>
352
353<screen role="root"><userinput>cat &gt; /etc/pam.d/polkit-1 &lt;&lt; "EOF"
354<literal># Begin /etc/pam.d/polkit-1
355
356auth include system-auth
357account include system-account
358password include system-password
359session include system-session
360
361# End /etc/pam.d/polkit-1</literal>
362EOF</userinput></screen>
363
364 </sect3>
365
366 </sect2>
367
368 <sect2 role="content">
369 <title>Contents</title>
370
371 <segmentedlist>
372 <segtitle>Installed Programs</segtitle>
373 <segtitle>Installed Libraries</segtitle>
374 <segtitle>Installed Directories</segtitle>
375
376 <seglistitem>
377 <seg>
378 pkaction, pkcheck, <!--pk-example-frobnicate,--> pkexec,
379 pkttyagent and polkitd
380 </seg>
381 <seg>
382 libpolkit-agent-1.so and
383 libpolkit-gobject-1.so
384 </seg>
385 <seg>
386 /etc/polkit-1,
387 /usr/include/polkit-1,
388 /usr/lib/polkit-1,
389 /usr/share/gtk-doc/html/polkit-1 and
390 /usr/share/polkit-1
391 </seg>
392 </seglistitem>
393 </segmentedlist>
394
395 <variablelist>
396 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
397 <?dbfo list-presentation="list"?>
398 <?dbhtml list-presentation="table"?>
399
400 <varlistentry id="pkaction">
401 <term><command>pkaction</command></term>
402 <listitem>
403 <para>
404 is used to obtain information about registered PolicyKit actions
405 </para>
406 <indexterm zone="polkit pkaction">
407 <primary sortas="b-pkaction">pkaction</primary>
408 </indexterm>
409 </listitem>
410 </varlistentry>
411
412 <varlistentry id="pkcheck">
413 <term><command>pkcheck</command></term>
414 <listitem>
415 <para>
416 is used to check whether a process is authorized for action
417 </para>
418 <indexterm zone="polkit pkcheck">
419 <primary sortas="b-pkcheck">pkcheck</primary>
420 </indexterm>
421 </listitem>
422 </varlistentry>
423
424<!--
425 <varlistentry id="pk-example-frobnicate">
426 <term><command>pk-example-frobnicate</command></term>
427 <listitem>
428 <para>
429 is an example program to test the <command>pkexec</command>
430 command
431 </para>
432 <indexterm zone="polkit pk-example-frobnicate">
433 <primary sortas="b-pk-example-frobnicate">pk-example-frobnicate</primary>
434 </indexterm>
435 </listitem>
436 </varlistentry>
437-->
438
439 <varlistentry id="pkexec">
440 <term><command>pkexec</command></term>
441 <listitem>
442 <para>
443 allows an authorized user to execute a command as another user
444 </para>
445 <indexterm zone="polkit pkexec">
446 <primary sortas="b-pkexec">pkexec</primary>
447 </indexterm>
448 </listitem>
449 </varlistentry>
450
451 <varlistentry id="pkttyagent">
452 <term><command>pkttyagent</command></term>
453 <listitem>
454 <para>
455 is used to start a textual authentication agent for the subject
456 </para>
457 <indexterm zone="polkit pkttyagent">
458 <primary sortas="b-pkttyagent">pkttyagent</primary>
459 </indexterm>
460 </listitem>
461 </varlistentry>
462
463 <varlistentry id="polkitd">
464 <term><command>polkitd</command></term>
465 <listitem>
466 <para>
467 provides the org.freedesktop.PolicyKit1 <application>D-Bus</application>
468 service on the system message bus
469 </para>
470 <indexterm zone="polkit polkitd">
471 <primary sortas="b-polkitd">polkitd</primary>
472 </indexterm>
473 </listitem>
474 </varlistentry>
475
476 <varlistentry id="libpolkit-agent-1">
477 <term><filename class="libraryfile">libpolkit-agent-1.so</filename></term>
478 <listitem>
479 <para>
480 contains the <application>Polkit</application> authentication
481 agent API functions
482 </para>
483 <indexterm zone="polkit libpolkit-agent-1">
484 <primary sortas="c-libpolkit-agent-1">libpolkit-agent-1.so</primary>
485 </indexterm>
486 </listitem>
487 </varlistentry>
488
489 <varlistentry id="libpolkit-gobject-1">
490 <term><filename class="libraryfile">libpolkit-gobject-1.so</filename></term>
491 <listitem>
492 <para>
493 contains the <application>Polkit</application> authorization API functions
494 </para>
495 <indexterm zone="polkit libpolkit-gobject-1">
496 <primary sortas="c-libpolkit-gobject-1">libpolkit-gobject-1.so</primary>
497 </indexterm>
498 </listitem>
499 </varlistentry>
500
501 </variablelist>
502
503 </sect2>
504
505</sect1>
Note: See TracBrowser for help on using the repository browser.