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
RevLine 
[ab4fdfc]1<?xml version="1.0" encoding="UTF-8"?>
[9d3d8a8]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
[927b972e]7 <!ENTITY polkit-download-http "https://github.com/polkit-org/polkit/archive/&polkit-version;/polkit-&polkit-version;.tar.gz">
[f47c6a6b]8 <!ENTITY polkit-download-ftp " ">
[927b972e]9 <!ENTITY polkit-md5sum "8e9f2377fc7b4010bd29b97d2e288b4f">
10 <!ENTITY polkit-size "444 KB">
[730d47f2]11 <!ENTITY polkit-buildsize "7.2 MB (with tests)">
12 <!ENTITY polkit-time "0.3 SBU (with tests; using parallelism=4)">
[9d3d8a8]13]>
14
[01996ebb]15<sect1 id="polkit" xreflabel="Polkit-&polkit-version;">
[9d3d8a8]16 <?dbhtml filename="polkit.html"?>
17
18
[01996ebb]19 <title>Polkit-&polkit-version;</title>
[9d3d8a8]20
21 <indexterm zone="polkit">
[01996ebb]22 <primary sortas="a-Polkit">Polkit</primary>
[9d3d8a8]23 </indexterm>
24
25 <sect2 role="package">
[01996ebb]26 <title>Introduction to Polkit</title>
[9d3d8a8]27
[b84342d6]28 <para>
[01996ebb]29 <application>Polkit</application> is a toolkit for defining and handling
[9ca304a]30 authorizations. It is used for allowing unprivileged processes to
[30f82900]31 communicate with privileged processes.
[b84342d6]32 </para>
[9d3d8a8]33
[d4dc5bae]34 &lfs122_checked;
[27e62762]35
[9d3d8a8]36 <bridgehead renderas="sect3">Package Information</bridgehead>
37 <itemizedlist spacing="compact">
38 <listitem>
[b84342d6]39 <para>
40 Download (HTTP): <ulink url="&polkit-download-http;"/>
41 </para>
[9d3d8a8]42 </listitem>
43 <listitem>
[b84342d6]44 <para>
45 Download (FTP): <ulink url="&polkit-download-ftp;"/>
46 </para>
[9d3d8a8]47 </listitem>
48 <listitem>
[b84342d6]49 <para>
50 Download MD5 sum: &polkit-md5sum;
51 </para>
[9d3d8a8]52 </listitem>
53 <listitem>
[b84342d6]54 <para>
55 Download size: &polkit-size;
56 </para>
[9d3d8a8]57 </listitem>
58 <listitem>
[b84342d6]59 <para>
60 Estimated disk space required: &polkit-buildsize;
61 </para>
[9d3d8a8]62 </listitem>
63 <listitem>
[b84342d6]64 <para>
65 Estimated build time: &polkit-time;
66 </para>
[9d3d8a8]67 </listitem>
68 </itemizedlist>
[ad539dbe]69
[7d5d3d4]70<!--
[7e280b45]71 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
72 <itemizedlist spacing="compact">
[ad539dbe]73 <listitem>
[4a0b346]74 <para>
[7e280b45]75 Required patch:
[4483a9a]76 <ulink url="&patch-root;/polkit-&polkit-version;-security_fixes-1.patch"/>
[4a0b346]77 </para>
78 </listitem>
[b5b1af68]79 <listitem>
80 <para>
81 Required patch:
82 <ulink url="&patch-root;/polkit-&polkit-version;-js91-1.patch"/>
83 </para>
84 </listitem>
[3b40dbb3]85 </itemizedlist>
[7d5d3d4]86-->
[ad539dbe]87
[01996ebb]88 <bridgehead renderas="sect3">Polkit Dependencies</bridgehead>
[9d3d8a8]89
90 <bridgehead renderas="sect4">Required</bridgehead>
[bb947c32]91 <para role="required">
[b844ed6]92 <xref linkend="duktape"/> and
[c0bc0a9]93 <xref linkend="glib2"/> (GObject Introspection recommended)
[4c2be438]94 </para>
95
[51dfb3e]96 <bridgehead renderas="sect4">Recommended</bridgehead>
97 <para role="recommended">
[3345cfea]98 <xref linkend="libxslt"/>,<phrase revision="systemd"> and</phrase>
99 <xref linkend="linux-pam"/><phrase revision="sysv">, and
100 <xref linkend="elogind"/>
[7cb46359]101 </phrase>
[f586237]102 </para>
103
[51dfb3e]104 <note>
[f586237]105 <para>
[51dfb3e]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.
[f586237]113 </para>
114 </note>
115
[9d3d8a8]116 <bridgehead renderas="sect4">Optional</bridgehead>
[bb947c32]117 <para role="optional">
[b844ed6]118 <xref linkend="gtk-doc"/> and
119 <xref linkend="python-dbusmock"/> (required for tests)
[f586237]120 </para>
121
122 <bridgehead renderas="sect4" revision="systemd">Required Runtime Dependencies</bridgehead>
123 <para role="required" revision="systemd">
[96e9478]124 <xref role="runtime" linkend="systemd"/>
[4c2be438]125 </para>
[875b4070]126
[f13e9026]127 <bridgehead renderas="sect4" id="polkit-agent" xreflabel="Polkit Authentication Agent">
128 Optional Runtime Dependencies
129 </bridgehead>
[fee64868]130 <para role="optional">
131 One polkit authentication agent for using polkit in the graphical
132 environment:
133 <application>polkit-kde-agent</application> in
[6d8eeb9]134 <xref role="runtime" linkend="plasma-build"/> for KDE,
[fee64868]135 the agent built in
[bdc255c]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
[fee64868]139 </para>
140
[875b4070]141 <note>
[b84342d6]142 <para>
[f586237]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
[927b972e]147 need to use <option>-D man=false</option> in the instructions
[f586237]148 below.
[b84342d6]149 </para>
[875b4070]150 </note>
[9d3d8a8]151
152 </sect2>
153
[5c2fdde]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
[9d3d8a8]169 <sect2 role="installation">
[01996ebb]170 <title>Installation of Polkit</title>
[9d3d8a8]171
[b84342d6]172 <para>
[01996ebb]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
[730d47f2]183 <para revision='sysv'>
184 First fix a build problem for sysV based systems:
[7e280b45]185 </para>
186
[730d47f2]187<screen revision="sysv"><userinput>sed -i '/systemd_sysusers_dir/s/^/#/' meson.build</userinput></screen>
[b5b1af68]188
[01996ebb]189 <para>
190 Install <application>Polkit</application> by running the following
[37aba7f]191 commands:
[b84342d6]192 </para>
[9d3d8a8]193
[59f6a1f]194<screen revision="systemd"><userinput>mkdir build &amp;&amp;
195cd build &amp;&amp;
196
[927b972e]197meson setup .. \
198 --prefix=/usr \
199 --buildtype=release \
200 -D man=true \
201 -D session_tracking=logind \
[0636def]202 -D tests=true</userinput></screen>
[51dfb3e]203
[59f6a1f]204<screen revision="sysv"><userinput>mkdir build &amp;&amp;
205cd build &amp;&amp;
206
[927b972e]207meson setup .. \
208 --prefix=/usr \
209 --buildtype=release \
210 -D man=true \
211 -D session_tracking=elogind \
[0636def]212 -D tests=true</userinput></screen>
[cd85943]213
214 <para>
215 Build the package:
216 </para>
217
218<screen><userinput>ninja</userinput></screen>
[59f6a1f]219
[b84342d6]220 <para>
[8558044]221 To test the results, first ensure that the system
[bf654b1]222 <application>D-Bus</application> daemon is running,
223 and both <xref linkend='dbus-python'/> and
224 <xref linkend='python-dbusmock'/> are installed.
[8de6bb81]225 Then run <command>ninja test</command>.
[59f6a1f]226 </para>
[9d3d8a8]227
[b84342d6]228 <para>
229 Now, as the <systemitem class="username">root</systemitem> user:
230 </para>
[9d3d8a8]231
[6be3fe3]232<screen role="root"><userinput>ninja install</userinput></screen>
[9d3d8a8]233
234 </sect2>
235
236 <sect2 role="commands">
237 <title>Command Explanations</title>
238
[7e280b45]239 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
240 href="../../xincludes/meson-buildtype-release.xml"/>
241
[492cca2c]242 <para>
[927b972e]243 <parameter>-D tests=true</parameter>: This switch allows to run the
[492cca2c]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
[1121404]249 <para>
[927b972e]250 <option>-D os_type=lfs</option>: Use this switch if you did not create
[1121404]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
[51dfb3e]256 <para>
[927b972e]257 <option>-D authfw=shadow</option>: This switch enables the
[f586237]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>.
[b84342d6]261 </para>
262
[59f6a1f]263 <para>
[927b972e]264 <option>-D introspection=false</option>: Use this option if you are certain
[59f6a1f]265 that you do not need gobject-introspection files for polkit, or do not have
[c0bc0a9]266 installed <xref linkend='glib2'/> with GObject Introspection.
[59f6a1f]267 </para>
268
269 <para>
[927b972e]270 <option>-D man=false</option>: Use this option to disable generating and
[59f6a1f]271 installing manual pages. This is useful if libxslt is not installed.
272 </para>
273
274 <para>
[927b972e]275 <option>-D examples=true</option>: Use this option to build the example
[59f6a1f]276 programs.
277 </para>
278
279 <para>
[927b972e]280 <option>-D gtk_doc=true</option>: Use this option to enable building and
[59f6a1f]281 installing the API documentation.
282 </para>
[51dfb3e]283
[9d3d8a8]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>
[b84342d6]295 <seg>
[59f6a1f]296 pkaction, pkcheck, <!--pk-example-frobnicate,--> pkexec,
[a428935]297 pkttyagent, and polkitd
[b84342d6]298 </seg>
299 <seg>
[0d7900a]300 libpolkit-agent-1.so and
[b84342d6]301 libpolkit-gobject-1.so
302 </seg>
[028759b]303 <seg>
[01996ebb]304 /etc/polkit-1,
305 /usr/include/polkit-1,
306 /usr/lib/polkit-1,
[a428935]307 /usr/share/gtk-doc/html/polkit-1, and
[028759b]308 /usr/share/polkit-1
[b84342d6]309 </seg>
[9d3d8a8]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>
[b84342d6]321 <para>
[4c24eb0a]322 is used to obtain information about registered PolicyKit actions
[b84342d6]323 </para>
[9d3d8a8]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>
[b84342d6]333 <para>
[4c24eb0a]334 is used to check whether a process is authorized for action
[b84342d6]335 </para>
[9d3d8a8]336 <indexterm zone="polkit pkcheck">
337 <primary sortas="b-pkcheck">pkcheck</primary>
338 </indexterm>
339 </listitem>
340 </varlistentry>
341
[59f6a1f]342<!--
[72d90b67]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>
[4c24eb0a]348 command
[72d90b67]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>
[59f6a1f]355-->
[7a9a7b26]356
[9d3d8a8]357 <varlistentry id="pkexec">
358 <term><command>pkexec</command></term>
359 <listitem>
[b84342d6]360 <para>
[4c24eb0a]361 allows an authorized user to execute a command as another user
[b84342d6]362 </para>
[9d3d8a8]363 <indexterm zone="polkit pkexec">
364 <primary sortas="b-pkexec">pkexec</primary>
365 </indexterm>
366 </listitem>
367 </varlistentry>
368
[b84342d6]369 <varlistentry id="pkttyagent">
370 <term><command>pkttyagent</command></term>
[9d3d8a8]371 <listitem>
[b84342d6]372 <para>
[4c24eb0a]373 is used to start a textual authentication agent for the subject
[b84342d6]374 </para>
375 <indexterm zone="polkit pkttyagent">
376 <primary sortas="b-pkttyagent">pkttyagent</primary>
[9d3d8a8]377 </indexterm>
378 </listitem>
[b84342d6]379 </varlistentry>
[9d3d8a8]380
[875b4070]381 <varlistentry id="polkitd">
[9d3d8a8]382 <term><command>polkitd</command></term>
383 <listitem>
[b84342d6]384 <para>
[0d7900a]385 provides the org.freedesktop.PolicyKit1 <application>D-Bus</application>
[4c24eb0a]386 service on the system message bus
[b84342d6]387 </para>
[875b4070]388 <indexterm zone="polkit polkitd">
[9d3d8a8]389 <primary sortas="b-polkitd">polkitd</primary>
390 </indexterm>
391 </listitem>
392 </varlistentry>
393
394 <varlistentry id="libpolkit-agent-1">
[4c24eb0a]395 <term><filename class="libraryfile">libpolkit-agent-1.so</filename></term>
[9d3d8a8]396 <listitem>
[b84342d6]397 <para>
[01996ebb]398 contains the <application>Polkit</application> authentication
[4c24eb0a]399 agent API functions
[b84342d6]400 </para>
[9d3d8a8]401 <indexterm zone="polkit libpolkit-agent-1">
[b84342d6]402 <primary sortas="c-libpolkit-agent-1">libpolkit-agent-1.so</primary>
[9d3d8a8]403 </indexterm>
404 </listitem>
405 </varlistentry>
406
407 <varlistentry id="libpolkit-gobject-1">
[4c24eb0a]408 <term><filename class="libraryfile">libpolkit-gobject-1.so</filename></term>
[9d3d8a8]409 <listitem>
[b84342d6]410 <para>
[4c24eb0a]411 contains the <application>Polkit</application> authorization API functions
[b84342d6]412 </para>
[9d3d8a8]413 <indexterm zone="polkit libpolkit-gobject-1">
[b84342d6]414 <primary sortas="c-libpolkit-gobject-1">libpolkit-gobject-1.so</primary>
[9d3d8a8]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.