source: postlfs/security/polkit.xml@ 14bd41d

11.3 12.0 12.1 12.2 gimp3 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/for-12.3 xry111/llvm18 xry111/spidermonkey128 xry111/xf86-video-removal
Last change on this file since 14bd41d was 14bd41d, checked in by Douglas R. Reno <renodr@…>, 2 years ago

Add JS102 and archive JS91.

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