source: postlfs/security/polkit.xml@ 2d0c6b1

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 2d0c6b1 was 6be3fe3, checked in by Bruce Dubbs <bdubbs@…>, 11 months ago

Update to polkit-123.

  • Property mode set to 100644
File size: 14.6 KB
RevLine 
[9d3d8a8]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
[60caf48]7 <!ENTITY polkit-download-http "https://gitlab.freedesktop.org/polkit/polkit/-/archive/&polkit-version;/polkit-&polkit-version;.tar.gz">
[f47c6a6b]8 <!ENTITY polkit-download-ftp " ">
[6be3fe3]9 <!ENTITY polkit-md5sum "36540b837c588e1e77145523bb39f511">
10 <!ENTITY polkit-size "736 KB">
11 <!ENTITY polkit-buildsize "6.8 MB (with tests)">
[7d5d3d4]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
[18aa9339]34 &lfs113_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">
[6d03f3e]92 <xref linkend="glib2"/> and
[f401faa6]93 <xref linkend="duktape"/>
[4c2be438]94 </para>
95
[51dfb3e]96 <bridgehead renderas="sect4">Recommended</bridgehead>
97 <para role="recommended">
[59f6a1f]98 <xref linkend="gobject-introspection"/>,
[3345cfea]99 <xref linkend="libxslt"/>,<phrase revision="systemd"> and</phrase>
100 <xref linkend="linux-pam"/><phrase revision="sysv">, and
101 <xref linkend="elogind"/>
[7cb4635]102 </phrase>
[f586237]103 </para>
104
[51dfb3e]105 <note>
[f586237]106 <para>
[51dfb3e]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.
[f586237]114 </para>
115 </note>
116
117
[59f6a1f]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
[4c2be438]123 <bridgehead renderas="sect4">Optional (Required if building GNOME)</bridgehead>
124 <para role="optional">
125 <xref linkend="gobject-introspection"/>
126 </para>
[59f6a1f]127 -->
[9d3d8a8]128
129 <bridgehead renderas="sect4">Optional</bridgehead>
[bb947c32]130 <para role="optional">
[a428935]131 <xref linkend="gtk-doc"/>,
[14bd41d]132 <xref linkend="js102"/> (can be used in place of duktape), and
[a428935]133 <xref linkend="python-dbusmock"/> (for tests)
[f586237]134 </para>
135
136 <bridgehead renderas="sect4" revision="systemd">Required Runtime Dependencies</bridgehead>
137 <para role="required" revision="systemd">
[96e9478]138 <xref role="runtime" linkend="systemd"/>
[4c2be438]139 </para>
[875b4070]140
[f13e9026]141 <bridgehead renderas="sect4" id="polkit-agent" xreflabel="Polkit Authentication Agent">
142 Optional Runtime Dependencies
143 </bridgehead>
[fee64868]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
[a428935]153 <xref role="runtime" linkend="lxsession"/> for LXDE
[fee64868]154 </para>
155
[875b4070]156 <note>
[b84342d6]157 <para>
[f586237]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
[59f6a1f]162 need to use <option>-Dman=false</option> in the instructions
[f586237]163 below.
[b84342d6]164 </para>
[875b4070]165 </note>
[9d3d8a8]166
167 </sect2>
168
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
[59f6a1f]183 <para>
[6be3fe3]184 If using <xref linkend="js102"/>, make the following change (see Command
185 Explanations below for more information):
[59f6a1f]186 </para>
187
[6be3fe3]188<screen><userinput remap="nodep">sed -e 's/JS_Init/JS::DisableJitBackend(); &amp;/' \
189 -i src/polkitbackend/polkitbackendjsauthority.cpp</userinput></screen>
[7e280b45]190
[6be3fe3]191<!--
[7e280b45]192 <para>
[4483a9a]193 Apply a patch to fix two security issues:
[7e280b45]194 </para>
195
[4483a9a]196<screen><userinput remap="pre">patch -Np1 -i ../polkit-&polkit-version;-security_fixes-1.patch</userinput></screen>
[7e280b45]197
[b5b1af68]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>
[7d5d3d4]203-->
[b5b1af68]204
[01996ebb]205 <para>
206 Install <application>Polkit</application> by running the following
[37aba7f]207 commands:
[b84342d6]208 </para>
[9d3d8a8]209
[59f6a1f]210<screen revision="systemd"><userinput>mkdir build &amp;&amp;
211cd build &amp;&amp;
212
[91318eb]213meson setup .. \
214 --prefix=/usr \
[60caf48]215 --buildtype=release \
[59f6a1f]216 -Dman=true \
217 -Dsession_tracking=libsystemd-login \
[91318eb]218 -Dtests=true &amp;&amp;
[59f6a1f]219ninja</userinput></screen>
[51dfb3e]220
[59f6a1f]221<screen revision="sysv"><userinput>mkdir build &amp;&amp;
222cd build &amp;&amp;
223
[91318eb]224meson setup .. \
225 --prefix=/usr \
[60caf48]226 --buildtype=release \
[59f6a1f]227 -Dman=true \
228 -Dsession_tracking=libelogind \
[91318eb]229 -Dtests=true &amp;&amp;
[59f6a1f]230ninja</userinput></screen>
231
[b84342d6]232 <para>
[8558044]233 To test the results, first ensure that the system
[bf654b1]234 <application>D-Bus</application> daemon is running,
235 and both <xref linkend='dbus-python'/> and
236 <xref linkend='python-dbusmock'/> are installed.
[8de6bb81]237 Then run <command>ninja test</command>.
[59f6a1f]238 </para>
[9d3d8a8]239
[b84342d6]240 <para>
241 Now, as the <systemitem class="username">root</systemitem> user:
242 </para>
[9d3d8a8]243
[6be3fe3]244<screen role="root"><userinput>ninja install</userinput></screen>
[9d3d8a8]245
246 </sect2>
247
248 <sect2 role="commands">
249 <title>Command Explanations</title>
250
[7e280b45]251 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
252 href="../../xincludes/meson-buildtype-release.xml"/>
253
[492cca2c]254 <para>
255 <parameter>-Dtests=true</parameter>: This switch allows to run the
256 test suite of this package. As <application>Polkit</application> is
257 used for authorizations, its integrity can affect system security.
258 So it's recommended to run the test suite building this package.
259 </para>
260
[7d5d3d4]261 <para>
[0c72a8b]262 <option>-Djs_engine=mozjs</option>: This switch allows using the
263 <xref linkend="js102"/> JavaScript engine instead of the
264 <xref linkend='duktape'/> JavaScript engine.
[7d5d3d4]265 </para>
266
[59f6a1f]267 <!--
[4a0b346]268 <para revision="sysv">
[59f6a1f]269 <parameter>- -disable-libsystemd-login</parameter>: This switch forces
[4a0b346]270 polkit to build with elogind support (if available) rather than
271 systemd-logind.
272 </para>
273
[7a9a7b26]274
[ad539dbe]275 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
276 href="../../xincludes/static-libraries.xml"/>
[59f6a1f]277 -->
[7a9a7b26]278
[1121404]279 <para>
280 <option>-Dos_type=lfs</option>: Use this switch if you did not create
281 the <filename>/etc/lfs-release</filename> file or distribution auto
282 detection will fail and you will be unable to use
283 <application>Polkit</application>.
284 </para>
285
[51dfb3e]286 <para>
[59f6a1f]287 <option>-Dauthfw=shadow</option>: This switch enables the
[f586237]288 package to use the <application>Shadow</application> rather than the
289 <application>Linux PAM</application> Authentication framework. Use it
290 if you have not installed <application>Linux PAM</application>.
[b84342d6]291 </para>
292
[59f6a1f]293 <!--
[e05cd03f]294 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
[51dfb3e]295 href="../../xincludes/gtk-doc-rebuild.xml"/>
[59f6a1f]296 -->
297
298 <para>
299 <option>-Dintrospection=false</option>: Use this option if you are certain
300 that you do not need gobject-introspection files for polkit, or do not have
301 gobject-introspection installed.
302 </para>
303
304 <para>
305 <option>-Dman=false</option>: Use this option to disable generating and
306 installing manual pages. This is useful if libxslt is not installed.
307 </para>
308
309 <para>
310 <option>-Dexamples=true</option>: Use this option to build the example
311 programs.
312 </para>
313
314 <para>
315 <option>-Dgtk_doc=true</option>: Use this option to enable building and
316 installing the API documentation.
317 </para>
[51dfb3e]318
[9d3d8a8]319 </sect2>
320
321 <sect2 role="content">
322 <title>Contents</title>
323
324 <segmentedlist>
325 <segtitle>Installed Programs</segtitle>
326 <segtitle>Installed Libraries</segtitle>
327 <segtitle>Installed Directories</segtitle>
328
329 <seglistitem>
[b84342d6]330 <seg>
[59f6a1f]331 pkaction, pkcheck, <!--pk-example-frobnicate,--> pkexec,
[a428935]332 pkttyagent, and polkitd
[b84342d6]333 </seg>
334 <seg>
[0d7900a]335 libpolkit-agent-1.so and
[b84342d6]336 libpolkit-gobject-1.so
337 </seg>
[028759b]338 <seg>
[01996ebb]339 /etc/polkit-1,
340 /usr/include/polkit-1,
341 /usr/lib/polkit-1,
[a428935]342 /usr/share/gtk-doc/html/polkit-1, and
[028759b]343 /usr/share/polkit-1
[b84342d6]344 </seg>
[9d3d8a8]345 </seglistitem>
346 </segmentedlist>
347
348 <variablelist>
349 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
350 <?dbfo list-presentation="list"?>
351 <?dbhtml list-presentation="table"?>
352
353 <varlistentry id="pkaction">
354 <term><command>pkaction</command></term>
355 <listitem>
[b84342d6]356 <para>
[4c24eb0a]357 is used to obtain information about registered PolicyKit actions
[b84342d6]358 </para>
[9d3d8a8]359 <indexterm zone="polkit pkaction">
360 <primary sortas="b-pkaction">pkaction</primary>
361 </indexterm>
362 </listitem>
363 </varlistentry>
364
365 <varlistentry id="pkcheck">
366 <term><command>pkcheck</command></term>
367 <listitem>
[b84342d6]368 <para>
[4c24eb0a]369 is used to check whether a process is authorized for action
[b84342d6]370 </para>
[9d3d8a8]371 <indexterm zone="polkit pkcheck">
372 <primary sortas="b-pkcheck">pkcheck</primary>
373 </indexterm>
374 </listitem>
375 </varlistentry>
376
[59f6a1f]377<!--
[72d90b67]378 <varlistentry id="pk-example-frobnicate">
379 <term><command>pk-example-frobnicate</command></term>
380 <listitem>
381 <para>
382 is an example program to test the <command>pkexec</command>
[4c24eb0a]383 command
[72d90b67]384 </para>
385 <indexterm zone="polkit pk-example-frobnicate">
386 <primary sortas="b-pk-example-frobnicate">pk-example-frobnicate</primary>
387 </indexterm>
388 </listitem>
389 </varlistentry>
[59f6a1f]390-->
[7a9a7b26]391
[9d3d8a8]392 <varlistentry id="pkexec">
393 <term><command>pkexec</command></term>
394 <listitem>
[b84342d6]395 <para>
[4c24eb0a]396 allows an authorized user to execute a command as another user
[b84342d6]397 </para>
[9d3d8a8]398 <indexterm zone="polkit pkexec">
399 <primary sortas="b-pkexec">pkexec</primary>
400 </indexterm>
401 </listitem>
402 </varlistentry>
403
[b84342d6]404 <varlistentry id="pkttyagent">
405 <term><command>pkttyagent</command></term>
[9d3d8a8]406 <listitem>
[b84342d6]407 <para>
[4c24eb0a]408 is used to start a textual authentication agent for the subject
[b84342d6]409 </para>
410 <indexterm zone="polkit pkttyagent">
411 <primary sortas="b-pkttyagent">pkttyagent</primary>
[9d3d8a8]412 </indexterm>
413 </listitem>
[b84342d6]414 </varlistentry>
[9d3d8a8]415
[875b4070]416 <varlistentry id="polkitd">
[9d3d8a8]417 <term><command>polkitd</command></term>
418 <listitem>
[b84342d6]419 <para>
[0d7900a]420 provides the org.freedesktop.PolicyKit1 <application>D-Bus</application>
[4c24eb0a]421 service on the system message bus
[b84342d6]422 </para>
[875b4070]423 <indexterm zone="polkit polkitd">
[9d3d8a8]424 <primary sortas="b-polkitd">polkitd</primary>
425 </indexterm>
426 </listitem>
427 </varlistentry>
428
429 <varlistentry id="libpolkit-agent-1">
[4c24eb0a]430 <term><filename class="libraryfile">libpolkit-agent-1.so</filename></term>
[9d3d8a8]431 <listitem>
[b84342d6]432 <para>
[01996ebb]433 contains the <application>Polkit</application> authentication
[4c24eb0a]434 agent API functions
[b84342d6]435 </para>
[9d3d8a8]436 <indexterm zone="polkit libpolkit-agent-1">
[b84342d6]437 <primary sortas="c-libpolkit-agent-1">libpolkit-agent-1.so</primary>
[9d3d8a8]438 </indexterm>
439 </listitem>
440 </varlistentry>
441
442 <varlistentry id="libpolkit-gobject-1">
[4c24eb0a]443 <term><filename class="libraryfile">libpolkit-gobject-1.so</filename></term>
[9d3d8a8]444 <listitem>
[b84342d6]445 <para>
[4c24eb0a]446 contains the <application>Polkit</application> authorization API functions
[b84342d6]447 </para>
[9d3d8a8]448 <indexterm zone="polkit libpolkit-gobject-1">
[b84342d6]449 <primary sortas="c-libpolkit-gobject-1">libpolkit-gobject-1.so</primary>
[9d3d8a8]450 </indexterm>
451 </listitem>
452 </varlistentry>
453
454 </variablelist>
455
456 </sect2>
457
458</sect1>
Note: See TracBrowser for help on using the repository browser.