source: postlfs/security/polkit.xml@ 15a9f25

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 8.4 9.0 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 15a9f25 was 15a9f25, checked in by Douglas R. Reno <renodr@…>, 5 years ago

Update polkit security patch to fix another authentication bypass

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

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