source: postlfs/security/polkit.xml@ aa0b625

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/llvm18 xry111/soup3 xry111/xf86-video-removal
Last change on this file since aa0b625 was aa0b625, checked in by Douglas R. Reno <renodr@…>, 20 months ago

Tag Xorg and dependencies

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