source: postlfs/security/polkit.xml@ 215c3ea5

12.0 12.1 ken/TL2024 ken/tuningfonts lazarus plabs/newcss python3.11 rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/llvm18
Last change on this file since 215c3ea5 was 215c3ea5, checked in by Ken Moffat <ken@…>, 10 months ago

Add missing explanation for polkit JS102 sed.

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