source: postlfs/security/polkit.xml@ e5d0a32

trunk
Last change on this file since e5d0a32 was b844ed6, checked in by Xi Ruoyao <xry111@…>, 3 weeks ago

polkit: Remove spidermonkey support

We're updating spidermonkey to 128 soon for GNOME 47, and polkit has
decided to unsupport spidermonkey so there won't be a polkit release
supporting the new spidermonkey. Just make duktape required and remove
references to spidermonkey.

  • Property mode set to 100644
File size: 13.3 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
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://github.com/polkit-org/polkit/archive/&polkit-version;/polkit-&polkit-version;.tar.gz">
8 <!ENTITY polkit-download-ftp " ">
9 <!ENTITY polkit-md5sum "8e9f2377fc7b4010bd29b97d2e288b4f">
10 <!ENTITY polkit-size "444 KB">
11 <!ENTITY polkit-buildsize "7.2 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 &lfs122_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="duktape"/> and
93 <xref linkend="glib2"/> (GObject Introspection recommended)
94 </para>
95
96 <bridgehead renderas="sect4">Recommended</bridgehead>
97 <para role="recommended">
98 <xref linkend="libxslt"/>,<phrase revision="systemd"> and</phrase>
99 <xref linkend="linux-pam"/><phrase revision="sysv">, and
100 <xref linkend="elogind"/>
101 </phrase>
102 </para>
103
104 <note>
105 <para>
106 Since <phrase revision="sysv"><command>elogind</command></phrase>
107 <phrase revision="systemd"><command>systemd-logind</command></phrase>
108 uses PAM to register user sessions, it is a good idea to build
109 <application>Polkit</application> with PAM support so
110 <phrase revision="sysv"><command>elogind</command></phrase>
111 <phrase revision="systemd"><command>systemd-logind</command></phrase>
112 can track <application>Polkit</application> sessions.
113 </para>
114 </note>
115
116 <bridgehead renderas="sect4">Optional</bridgehead>
117 <para role="optional">
118 <xref linkend="gtk-doc"/> and
119 <xref linkend="python-dbusmock"/> (required for tests)
120 </para>
121
122 <bridgehead renderas="sect4" revision="systemd">Required Runtime Dependencies</bridgehead>
123 <para role="required" revision="systemd">
124 <xref role="runtime" linkend="systemd"/>
125 </para>
126
127 <bridgehead renderas="sect4" id="polkit-agent" xreflabel="Polkit Authentication Agent">
128 Optional Runtime Dependencies
129 </bridgehead>
130 <para role="optional">
131 One polkit authentication agent for using polkit in the graphical
132 environment:
133 <application>polkit-kde-agent</application> in
134 <xref role="runtime" linkend="plasma-build"/> for KDE,
135 the agent built in
136 <xref role="runtime" linkend="gnome-shell"/> for GNOME3,
137 <xref role="runtime" linkend="polkit-gnome"/> for XFCE, and
138 <xref role="runtime" linkend="lxqt-policykit"/> for LXQt
139 </para>
140
141 <note>
142 <para>
143 If <xref linkend="libxslt"/> is installed,
144 then <xref linkend="DocBook"/> and <xref linkend="docbook-xsl"/> are
145 required. If you have installed <xref linkend="libxslt"/>, but you do
146 not want to install any of the DocBook packages mentioned, you will
147 need to use <option>-D man=false</option> in the instructions
148 below.
149 </para>
150 </note>
151
152 </sect2>
153
154 <sect2 role="kernel" id="polkit-test-kernel">
155 <title>Kernel Configuration</title>
156
157 <para>
158 Some tests need user namespace. If running the test suite, enable it:
159 </para>
160
161 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
162 href="polkit-test-kernel.xml"/>
163
164 <indexterm zone="polkit polkit-test-kernel">
165 <primary sortas="d-polkit">polkit (testing)</primary>
166 </indexterm>
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 revision='sysv'>
184 First fix a build problem for sysV based systems:
185 </para>
186
187<screen revision="sysv"><userinput>sed -i '/systemd_sysusers_dir/s/^/#/' meson.build</userinput></screen>
188
189 <para>
190 Install <application>Polkit</application> by running the following
191 commands:
192 </para>
193
194<screen revision="systemd"><userinput>mkdir build &amp;&amp;
195cd build &amp;&amp;
196
197meson setup .. \
198 --prefix=/usr \
199 --buildtype=release \
200 -D man=true \
201 -D session_tracking=logind \
202 -D tests=true</userinput></screen>
203
204<screen revision="sysv"><userinput>mkdir build &amp;&amp;
205cd build &amp;&amp;
206
207meson setup .. \
208 --prefix=/usr \
209 --buildtype=release \
210 -D man=true \
211 -D session_tracking=elogind \
212 -D tests=true</userinput></screen>
213
214 <para>
215 Build the package:
216 </para>
217
218<screen><userinput>ninja</userinput></screen>
219
220 <para>
221 To test the results, first ensure that the system
222 <application>D-Bus</application> daemon is running,
223 and both <xref linkend='dbus-python'/> and
224 <xref linkend='python-dbusmock'/> are installed.
225 Then run <command>ninja test</command>.
226 </para>
227
228 <para>
229 Now, as the <systemitem class="username">root</systemitem> user:
230 </para>
231
232<screen role="root"><userinput>ninja install</userinput></screen>
233
234 </sect2>
235
236 <sect2 role="commands">
237 <title>Command Explanations</title>
238
239 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
240 href="../../xincludes/meson-buildtype-release.xml"/>
241
242 <para>
243 <parameter>-D tests=true</parameter>: This switch allows to run the
244 test suite of this package. As <application>Polkit</application> is
245 used for authorizations, its integrity can affect system security.
246 So it's recommended to run the test suite building this package.
247 </para>
248
249 <para>
250 <option>-D os_type=lfs</option>: Use this switch if you did not create
251 the <filename>/etc/lfs-release</filename> file or distribution auto
252 detection will fail and you will be unable to use
253 <application>Polkit</application>.
254 </para>
255
256 <para>
257 <option>-D authfw=shadow</option>: This switch enables the
258 package to use the <application>Shadow</application> rather than the
259 <application>Linux PAM</application> Authentication framework. Use it
260 if you have not installed <application>Linux PAM</application>.
261 </para>
262
263 <para>
264 <option>-D introspection=false</option>: Use this option if you are certain
265 that you do not need gobject-introspection files for polkit, or do not have
266 installed <xref linkend='glib2'/> with GObject Introspection.
267 </para>
268
269 <para>
270 <option>-D man=false</option>: Use this option to disable generating and
271 installing manual pages. This is useful if libxslt is not installed.
272 </para>
273
274 <para>
275 <option>-D examples=true</option>: Use this option to build the example
276 programs.
277 </para>
278
279 <para>
280 <option>-D gtk_doc=true</option>: Use this option to enable building and
281 installing the API documentation.
282 </para>
283
284 </sect2>
285
286 <sect2 role="content">
287 <title>Contents</title>
288
289 <segmentedlist>
290 <segtitle>Installed Programs</segtitle>
291 <segtitle>Installed Libraries</segtitle>
292 <segtitle>Installed Directories</segtitle>
293
294 <seglistitem>
295 <seg>
296 pkaction, pkcheck, <!--pk-example-frobnicate,--> pkexec,
297 pkttyagent, and polkitd
298 </seg>
299 <seg>
300 libpolkit-agent-1.so and
301 libpolkit-gobject-1.so
302 </seg>
303 <seg>
304 /etc/polkit-1,
305 /usr/include/polkit-1,
306 /usr/lib/polkit-1,
307 /usr/share/gtk-doc/html/polkit-1, and
308 /usr/share/polkit-1
309 </seg>
310 </seglistitem>
311 </segmentedlist>
312
313 <variablelist>
314 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
315 <?dbfo list-presentation="list"?>
316 <?dbhtml list-presentation="table"?>
317
318 <varlistentry id="pkaction">
319 <term><command>pkaction</command></term>
320 <listitem>
321 <para>
322 is used to obtain information about registered PolicyKit actions
323 </para>
324 <indexterm zone="polkit pkaction">
325 <primary sortas="b-pkaction">pkaction</primary>
326 </indexterm>
327 </listitem>
328 </varlistentry>
329
330 <varlistentry id="pkcheck">
331 <term><command>pkcheck</command></term>
332 <listitem>
333 <para>
334 is used to check whether a process is authorized for action
335 </para>
336 <indexterm zone="polkit pkcheck">
337 <primary sortas="b-pkcheck">pkcheck</primary>
338 </indexterm>
339 </listitem>
340 </varlistentry>
341
342<!--
343 <varlistentry id="pk-example-frobnicate">
344 <term><command>pk-example-frobnicate</command></term>
345 <listitem>
346 <para>
347 is an example program to test the <command>pkexec</command>
348 command
349 </para>
350 <indexterm zone="polkit pk-example-frobnicate">
351 <primary sortas="b-pk-example-frobnicate">pk-example-frobnicate</primary>
352 </indexterm>
353 </listitem>
354 </varlistentry>
355-->
356
357 <varlistentry id="pkexec">
358 <term><command>pkexec</command></term>
359 <listitem>
360 <para>
361 allows an authorized user to execute a command as another user
362 </para>
363 <indexterm zone="polkit pkexec">
364 <primary sortas="b-pkexec">pkexec</primary>
365 </indexterm>
366 </listitem>
367 </varlistentry>
368
369 <varlistentry id="pkttyagent">
370 <term><command>pkttyagent</command></term>
371 <listitem>
372 <para>
373 is used to start a textual authentication agent for the subject
374 </para>
375 <indexterm zone="polkit pkttyagent">
376 <primary sortas="b-pkttyagent">pkttyagent</primary>
377 </indexterm>
378 </listitem>
379 </varlistentry>
380
381 <varlistentry id="polkitd">
382 <term><command>polkitd</command></term>
383 <listitem>
384 <para>
385 provides the org.freedesktop.PolicyKit1 <application>D-Bus</application>
386 service on the system message bus
387 </para>
388 <indexterm zone="polkit polkitd">
389 <primary sortas="b-polkitd">polkitd</primary>
390 </indexterm>
391 </listitem>
392 </varlistentry>
393
394 <varlistentry id="libpolkit-agent-1">
395 <term><filename class="libraryfile">libpolkit-agent-1.so</filename></term>
396 <listitem>
397 <para>
398 contains the <application>Polkit</application> authentication
399 agent API functions
400 </para>
401 <indexterm zone="polkit libpolkit-agent-1">
402 <primary sortas="c-libpolkit-agent-1">libpolkit-agent-1.so</primary>
403 </indexterm>
404 </listitem>
405 </varlistentry>
406
407 <varlistentry id="libpolkit-gobject-1">
408 <term><filename class="libraryfile">libpolkit-gobject-1.so</filename></term>
409 <listitem>
410 <para>
411 contains the <application>Polkit</application> authorization API functions
412 </para>
413 <indexterm zone="polkit libpolkit-gobject-1">
414 <primary sortas="c-libpolkit-gobject-1">libpolkit-gobject-1.so</primary>
415 </indexterm>
416 </listitem>
417 </varlistentry>
418
419 </variablelist>
420
421 </sect2>
422
423</sect1>
Note: See TracBrowser for help on using the repository browser.