source: postlfs/security/polkit.xml@ f401faa6

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/soup3 xry111/spidermonkey128 xry111/xf86-video-removal
Last change on this file since f401faa6 was f401faa6, checked in by Tim Tassonis <stuff@…>, 2 years ago

Add duktape-2.7.0, allow polkit to use duktape instead of JS.

  • 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="js91"/> or
97 <xref linkend="duktape"/>
98 </para>
99
100 <bridgehead renderas="sect4">Recommended</bridgehead>
101 <para role="recommended">
102 <xref linkend="gobject-introspection"/>,
103 <xref linkend="libxslt"/>,
104 <xref linkend="linux-pam"/>
105 <phrase revision="sysv">
106 and <xref role="first" linkend="elogind"/>
107 </phrase>
108 </para>
109
110 <note>
111 <para>
112 Since <phrase revision="sysv"><command>elogind</command></phrase>
113 <phrase revision="systemd"><command>systemd-logind</command></phrase>
114 uses PAM to register user sessions, it is a good idea to build
115 <application>Polkit</application> with PAM support so
116 <phrase revision="sysv"><command>elogind</command></phrase>
117 <phrase revision="systemd"><command>systemd-logind</command></phrase>
118 can track <application>Polkit</application> sessions.
119 </para>
120 </note>
121
122
123 <!-- Due to the fact that meson will not autodetect g-i and
124 has it set to required unless you pass an option, and the likelihood
125 of users ignoring a command explanation and then sending in mails
126 regarding KDE or GNOME not working after installing polkit, let's move
127 it to recommended. See #15640 for logic
128 <bridgehead renderas="sect4">Optional (Required if building GNOME)</bridgehead>
129 <para role="optional">
130 <xref linkend="gobject-introspection"/>
131 </para>
132 -->
133
134 <bridgehead renderas="sect4">Optional</bridgehead>
135 <para role="optional">
136 <xref linkend="dbus-python"/> and
137 <xref linkend="python-dbusmock"/> (both needed for tests),
138 <xref linkend="gtk-doc"/>, and
139 <ulink url="https://duktape.org">duktape</ulink>
140 </para>
141
142 <bridgehead renderas="sect4" revision="systemd">Required Runtime Dependencies</bridgehead>
143 <para role="required" revision="systemd">
144 <xref role="runtime" linkend="systemd"/>
145 </para>
146
147 <bridgehead renderas="sect4" id="polkit-agent" xreflabel="Polkit Authentication Agent">
148 Optional Runtime Dependencies
149 </bridgehead>
150 <para role="optional">
151 One polkit authentication agent for using polkit in the graphical
152 environment:
153 <application>polkit-kde-agent</application> in
154 <xref role="runtime" linkend="plasma5-build"/> for KDE,
155 the agent built in
156 <xref role="runtime" linkend="gnome-shell"/> for GNOME3,
157 <xref role="runtime" linkend="polkit-gnome"/> for XFCE, and
158 <application>lxpolkit</application> in
159 <xref role="runtime" linkend="lxsession"/> for LXDE.
160 </para>
161
162 <note>
163 <para>
164 If <xref linkend="libxslt"/> is installed,
165 then <xref linkend="DocBook"/> and <xref linkend="docbook-xsl"/> are
166 required. If you have installed <xref linkend="libxslt"/>, but you do
167 not want to install any of the DocBook packages mentioned, you will
168 need to use <option>-Dman=false</option> in the instructions
169 below.
170 </para>
171 </note>
172
173 <para condition="html" role="usernotes">User Notes:
174 <ulink url="&blfs-wiki;/polkit"/>
175 </para>
176 </sect2>
177
178 <sect2 role="installation">
179 <title>Installation of Polkit</title>
180
181 <para>
182 There should be a dedicated user and group to take control
183 of the <command>polkitd</command> daemon after it is
184 started. Issue the following commands as the
185 <systemitem class="username">root</systemitem> user:
186 </para>
187
188<screen role="root"><userinput>groupadd -fg 27 polkitd &amp;&amp;
189useradd -c "PolicyKit Daemon Owner" -d /etc/polkit-1 -u 27 \
190 -g polkitd -s /bin/false polkitd</userinput></screen>
191
192<!--
193 <para>
194 First, fix problems with setting permissions during installation and with
195 meson-0.60.0:
196 </para>
197
198<screen><userinput remap="pre">sed '/0,/s/^/#/' -i meson_post_install.py &amp;&amp;
199sed '/policy,/d' -i actions/meson.build \
200 -i src/examples/meson.build</userinput></screen>
201
202 <para>
203 Apply a patch to fix two security issues:
204 </para>
205
206<screen><userinput remap="pre">patch -Np1 -i ../polkit-&polkit-version;-security_fixes-1.patch</userinput></screen>
207
208 <para>
209 Port this package to use JS-91:
210 </para>
211
212<screen><userinput remap="pre">patch -Np1 -i ../polkit-&polkit-version;-js91-1.patch</userinput></screen>
213-->
214
215 <para>
216 Install <application>Polkit</application> by running the following
217 commands:
218 </para>
219
220<screen revision="systemd"><userinput>mkdir build &amp;&amp;
221cd build &amp;&amp;
222
223meson --prefix=/usr \
224 --buildtype=release \
225 -Dman=true \
226 -Dsession_tracking=libsystemd-login \
227 -Dtests=true \
228 -Djs_engine=mozjs \
229 .. &amp;&amp;
230ninja</userinput></screen>
231
232<screen revision="sysv"><userinput>mkdir build &amp;&amp;
233cd build &amp;&amp;
234
235meson --prefix=/usr \
236 --buildtype=release \
237 -Dman=true \
238 -Dsession_tracking=libelogind \
239 -Dsystemdsystemunitdir=/tmp \
240 -Dtests=true \
241 -Djs_engine=duktape \
242 .. &amp;&amp;
243ninja</userinput></screen>
244
245 <!--
246 "-t3" for raising the timeout to 90s, i. e. 3x the default:
247 https://gitlab.freedesktop.org/polkit/polkit/-/merge_requests/107
248 -->
249 <para>
250 To test the results, first ensure that the system
251 <application>D-Bus</application> daemon is running,
252 and both <xref linkend='dbus-python'/> and
253 <xref linkend='python-dbusmock'/> are installed.
254 Then run <command>meson test -t3</command>.
255 </para>
256
257 <para>
258 Now, as the <systemitem class="username">root</systemitem> user:
259 </para>
260
261<screen role="root" revision="systemd"><userinput>ninja install</userinput></screen>
262
263<screen role="root" revision="sysv"><userinput>ninja install &amp;&amp;
264rm -v /tmp/*.service</userinput></screen>
265
266 </sect2>
267
268 <sect2 role="commands">
269 <title>Command Explanations</title>
270
271 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
272 href="../../xincludes/meson-buildtype-release.xml"/>
273
274 <para>
275 <parameter>-Dtests=true</parameter>: This switch allows to run the
276 test suite of this package. As <application>Polkit</application> is
277 used for authorizations, its integrity can affect system security.
278 So it's recommended to run the test suite building this package.
279 </para>
280
281 <para>
282 <parameter>-Djs_engine=mozjs</parameter>: This switch allows using the
283 Mozilla JavaScript engine instead of Duktape.
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.