source: postlfs/security/polkit.xml@ 6f6c17a

12.0 12.1 gimp3 kea ken/TL2024 ken/tuningfonts lazarus lxqt plabs/newcss python3.11 rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/llvm18 xry111/xf86-video-removal
Last change on this file since 6f6c17a was 3345cfea, checked in by Pierre Labastie <pierre.labastie@…>, 16 months ago

Remove the hint for circular dep in polkit

now elogind is not circular anymore. Also add missing "and" to the
systemd version

  • Property mode set to 100644
File size: 14.9 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 " ">
[3fe867a0]9 <!ENTITY polkit-md5sum "bbe3e745fc5bc1a41f1b5044f09a0f26">
[7d5d3d4]10 <!ENTITY polkit-size "728 KB">
[3fe867a0]11 <!ENTITY polkit-buildsize "7.0 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 <para condition="html" role="usernotes">User Notes:
[37aba7f]168 <ulink url="&blfs-wiki;/polkit"/>
169 </para>
[9d3d8a8]170 </sect2>
171
172 <sect2 role="installation">
[01996ebb]173 <title>Installation of Polkit</title>
[9d3d8a8]174
[b84342d6]175 <para>
[01996ebb]176 There should be a dedicated user and group to take control
177 of the <command>polkitd</command> daemon after it is
178 started. Issue the following commands as the
179 <systemitem class="username">root</systemitem> user:
180 </para>
181
182<screen role="root"><userinput>groupadd -fg 27 polkitd &amp;&amp;
183useradd -c "PolicyKit Daemon Owner" -d /etc/polkit-1 -u 27 \
184 -g polkitd -s /bin/false polkitd</userinput></screen>
185
[7d5d3d4]186<!--
[59f6a1f]187 <para>
188 First, fix problems with setting permissions during installation and with
189 meson-0.60.0:
190 </para>
191
192<screen><userinput remap="pre">sed '/0,/s/^/#/' -i meson_post_install.py &amp;&amp;
193sed '/policy,/d' -i actions/meson.build \
194 -i src/examples/meson.build</userinput></screen>
[7e280b45]195
196 <para>
[4483a9a]197 Apply a patch to fix two security issues:
[7e280b45]198 </para>
199
[4483a9a]200<screen><userinput remap="pre">patch -Np1 -i ../polkit-&polkit-version;-security_fixes-1.patch</userinput></screen>
[7e280b45]201
[b5b1af68]202 <para>
203 Port this package to use JS-91:
204 </para>
205
206<screen><userinput remap="pre">patch -Np1 -i ../polkit-&polkit-version;-js91-1.patch</userinput></screen>
[7d5d3d4]207-->
[b5b1af68]208
[01996ebb]209 <para>
210 Install <application>Polkit</application> by running the following
[37aba7f]211 commands:
[b84342d6]212 </para>
[9d3d8a8]213
[59f6a1f]214<screen revision="systemd"><userinput>mkdir build &amp;&amp;
215cd build &amp;&amp;
216
[91318eb]217meson setup .. \
218 --prefix=/usr \
[60caf48]219 --buildtype=release \
[59f6a1f]220 -Dman=true \
221 -Dsession_tracking=libsystemd-login \
[91318eb]222 -Dtests=true &amp;&amp;
[59f6a1f]223ninja</userinput></screen>
[51dfb3e]224
[59f6a1f]225<screen revision="sysv"><userinput>mkdir build &amp;&amp;
226cd build &amp;&amp;
227
[91318eb]228meson setup .. \
229 --prefix=/usr \
[60caf48]230 --buildtype=release \
[59f6a1f]231 -Dman=true \
232 -Dsession_tracking=libelogind \
233 -Dsystemdsystemunitdir=/tmp \
[91318eb]234 -Dtests=true &amp;&amp;
[59f6a1f]235ninja</userinput></screen>
236
[b84342d6]237 <para>
[8558044]238 To test the results, first ensure that the system
[bf654b1]239 <application>D-Bus</application> daemon is running,
240 and both <xref linkend='dbus-python'/> and
241 <xref linkend='python-dbusmock'/> are installed.
[8de6bb81]242 Then run <command>ninja test</command>.
[59f6a1f]243 </para>
[9d3d8a8]244
[b84342d6]245 <para>
246 Now, as the <systemitem class="username">root</systemitem> user:
247 </para>
[9d3d8a8]248
[59f6a1f]249<screen role="root" revision="systemd"><userinput>ninja install</userinput></screen>
250
251<screen role="root" revision="sysv"><userinput>ninja install &amp;&amp;
252rm -v /tmp/*.service</userinput></screen>
[9d3d8a8]253
254 </sect2>
255
256 <sect2 role="commands">
257 <title>Command Explanations</title>
258
[7e280b45]259 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
260 href="../../xincludes/meson-buildtype-release.xml"/>
261
[492cca2c]262 <para>
263 <parameter>-Dtests=true</parameter>: This switch allows to run the
264 test suite of this package. As <application>Polkit</application> is
265 used for authorizations, its integrity can affect system security.
266 So it's recommended to run the test suite building this package.
267 </para>
268
[7d5d3d4]269 <para>
[0c72a8b]270 <option>-Djs_engine=mozjs</option>: This switch allows using the
271 <xref linkend="js102"/> JavaScript engine instead of the
272 <xref linkend='duktape'/> JavaScript engine.
[7d5d3d4]273 </para>
274
[59f6a1f]275 <!--
[4a0b346]276 <para revision="sysv">
[59f6a1f]277 <parameter>- -disable-libsystemd-login</parameter>: This switch forces
[4a0b346]278 polkit to build with elogind support (if available) rather than
279 systemd-logind.
280 </para>
281
[7a9a7b26]282
[ad539dbe]283 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
284 href="../../xincludes/static-libraries.xml"/>
[59f6a1f]285 -->
[7a9a7b26]286
[1121404]287 <para>
288 <option>-Dos_type=lfs</option>: Use this switch if you did not create
289 the <filename>/etc/lfs-release</filename> file or distribution auto
290 detection will fail and you will be unable to use
291 <application>Polkit</application>.
292 </para>
293
[51dfb3e]294 <para>
[59f6a1f]295 <option>-Dauthfw=shadow</option>: This switch enables the
[f586237]296 package to use the <application>Shadow</application> rather than the
297 <application>Linux PAM</application> Authentication framework. Use it
298 if you have not installed <application>Linux PAM</application>.
[b84342d6]299 </para>
300
[59f6a1f]301 <!--
[e05cd03f]302 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
[51dfb3e]303 href="../../xincludes/gtk-doc-rebuild.xml"/>
[59f6a1f]304 -->
305
306 <para>
307 <option>-Dintrospection=false</option>: Use this option if you are certain
308 that you do not need gobject-introspection files for polkit, or do not have
309 gobject-introspection installed.
310 </para>
311
312 <para>
313 <option>-Dman=false</option>: Use this option to disable generating and
314 installing manual pages. This is useful if libxslt is not installed.
315 </para>
316
317 <para>
318 <option>-Dexamples=true</option>: Use this option to build the example
319 programs.
320 </para>
321
322 <para>
323 <option>-Dgtk_doc=true</option>: Use this option to enable building and
324 installing the API documentation.
325 </para>
[51dfb3e]326
[9d3d8a8]327 </sect2>
328
329 <sect2 role="content">
330 <title>Contents</title>
331
332 <segmentedlist>
333 <segtitle>Installed Programs</segtitle>
334 <segtitle>Installed Libraries</segtitle>
335 <segtitle>Installed Directories</segtitle>
336
337 <seglistitem>
[b84342d6]338 <seg>
[59f6a1f]339 pkaction, pkcheck, <!--pk-example-frobnicate,--> pkexec,
[a428935]340 pkttyagent, and polkitd
[b84342d6]341 </seg>
342 <seg>
[0d7900a]343 libpolkit-agent-1.so and
[b84342d6]344 libpolkit-gobject-1.so
345 </seg>
[028759b]346 <seg>
[01996ebb]347 /etc/polkit-1,
348 /usr/include/polkit-1,
349 /usr/lib/polkit-1,
[a428935]350 /usr/share/gtk-doc/html/polkit-1, and
[028759b]351 /usr/share/polkit-1
[b84342d6]352 </seg>
[9d3d8a8]353 </seglistitem>
354 </segmentedlist>
355
356 <variablelist>
357 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
358 <?dbfo list-presentation="list"?>
359 <?dbhtml list-presentation="table"?>
360
361 <varlistentry id="pkaction">
362 <term><command>pkaction</command></term>
363 <listitem>
[b84342d6]364 <para>
[4c24eb0a]365 is used to obtain information about registered PolicyKit actions
[b84342d6]366 </para>
[9d3d8a8]367 <indexterm zone="polkit pkaction">
368 <primary sortas="b-pkaction">pkaction</primary>
369 </indexterm>
370 </listitem>
371 </varlistentry>
372
373 <varlistentry id="pkcheck">
374 <term><command>pkcheck</command></term>
375 <listitem>
[b84342d6]376 <para>
[4c24eb0a]377 is used to check whether a process is authorized for action
[b84342d6]378 </para>
[9d3d8a8]379 <indexterm zone="polkit pkcheck">
380 <primary sortas="b-pkcheck">pkcheck</primary>
381 </indexterm>
382 </listitem>
383 </varlistentry>
384
[59f6a1f]385<!--
[72d90b67]386 <varlistentry id="pk-example-frobnicate">
387 <term><command>pk-example-frobnicate</command></term>
388 <listitem>
389 <para>
390 is an example program to test the <command>pkexec</command>
[4c24eb0a]391 command
[72d90b67]392 </para>
393 <indexterm zone="polkit pk-example-frobnicate">
394 <primary sortas="b-pk-example-frobnicate">pk-example-frobnicate</primary>
395 </indexterm>
396 </listitem>
397 </varlistentry>
[59f6a1f]398-->
[7a9a7b26]399
[9d3d8a8]400 <varlistentry id="pkexec">
401 <term><command>pkexec</command></term>
402 <listitem>
[b84342d6]403 <para>
[4c24eb0a]404 allows an authorized user to execute a command as another user
[b84342d6]405 </para>
[9d3d8a8]406 <indexterm zone="polkit pkexec">
407 <primary sortas="b-pkexec">pkexec</primary>
408 </indexterm>
409 </listitem>
410 </varlistentry>
411
[b84342d6]412 <varlistentry id="pkttyagent">
413 <term><command>pkttyagent</command></term>
[9d3d8a8]414 <listitem>
[b84342d6]415 <para>
[4c24eb0a]416 is used to start a textual authentication agent for the subject
[b84342d6]417 </para>
418 <indexterm zone="polkit pkttyagent">
419 <primary sortas="b-pkttyagent">pkttyagent</primary>
[9d3d8a8]420 </indexterm>
421 </listitem>
[b84342d6]422 </varlistentry>
[9d3d8a8]423
[875b4070]424 <varlistentry id="polkitd">
[9d3d8a8]425 <term><command>polkitd</command></term>
426 <listitem>
[b84342d6]427 <para>
[0d7900a]428 provides the org.freedesktop.PolicyKit1 <application>D-Bus</application>
[4c24eb0a]429 service on the system message bus
[b84342d6]430 </para>
[875b4070]431 <indexterm zone="polkit polkitd">
[9d3d8a8]432 <primary sortas="b-polkitd">polkitd</primary>
433 </indexterm>
434 </listitem>
435 </varlistentry>
436
437 <varlistentry id="libpolkit-agent-1">
[4c24eb0a]438 <term><filename class="libraryfile">libpolkit-agent-1.so</filename></term>
[9d3d8a8]439 <listitem>
[b84342d6]440 <para>
[01996ebb]441 contains the <application>Polkit</application> authentication
[4c24eb0a]442 agent API functions
[b84342d6]443 </para>
[9d3d8a8]444 <indexterm zone="polkit libpolkit-agent-1">
[b84342d6]445 <primary sortas="c-libpolkit-agent-1">libpolkit-agent-1.so</primary>
[9d3d8a8]446 </indexterm>
447 </listitem>
448 </varlistentry>
449
450 <varlistentry id="libpolkit-gobject-1">
[4c24eb0a]451 <term><filename class="libraryfile">libpolkit-gobject-1.so</filename></term>
[9d3d8a8]452 <listitem>
[b84342d6]453 <para>
[4c24eb0a]454 contains the <application>Polkit</application> authorization API functions
[b84342d6]455 </para>
[9d3d8a8]456 <indexterm zone="polkit libpolkit-gobject-1">
[b84342d6]457 <primary sortas="c-libpolkit-gobject-1">libpolkit-gobject-1.so</primary>
[9d3d8a8]458 </indexterm>
459 </listitem>
460 </varlistentry>
461
462 </variablelist>
463
464 </sect2>
465
466</sect1>
Note: See TracBrowser for help on using the repository browser.