source: postlfs/security/polkit.xml@ c667e1e

12.0 12.1 12.2 gimp3 kea ken/TL2024 ken/tuningfonts lazarus lxqt plabs/newcss 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 c667e1e was 91318eb, checked in by Pierre Labastie <pierre.labastie@…>, 18 months ago

Add "setup" to meson commands

I've not been very consistent on typography, but it is a start

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