source: postlfs/security/polkit.xml@ 4a0b346

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 4a0b346 was 4a0b346, checked in by Pierre Labastie <pieere@…>, 4 years ago

Fix polkit detection of elogind (again!)

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@23592 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 14.3 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
[f47c6a6b]7 <!ENTITY polkit-download-http "https://www.freedesktop.org/software/polkit/releases/polkit-&polkit-version;.tar.gz">
8 <!ENTITY polkit-download-ftp " ">
9 <!ENTITY polkit-md5sum "bef4987566059634857b9882b48360f8">
10 <!ENTITY polkit-size "1.5 MB">
11 <!ENTITY polkit-buildsize "14 MB (add 2 MB for tests)">
12 <!ENTITY polkit-time "0.1 SBU (Using parallelism=4; add 0.3 SBU for tests)">
[9d3d8a8]13]>
14
[01996ebb]15<sect1 id="polkit" xreflabel="Polkit-&polkit-version;">
[9d3d8a8]16 <?dbhtml filename="polkit.html"?>
17
18 <sect1info>
19 <othername>$LastChangedBy$</othername>
20 <date>$Date$</date>
21 </sect1info>
22
[01996ebb]23 <title>Polkit-&polkit-version;</title>
[9d3d8a8]24
25 <indexterm zone="polkit">
[01996ebb]26 <primary sortas="a-Polkit">Polkit</primary>
[9d3d8a8]27 </indexterm>
28
29 <sect2 role="package">
[01996ebb]30 <title>Introduction to Polkit</title>
[9d3d8a8]31
[b84342d6]32 <para>
[01996ebb]33 <application>Polkit</application> is a toolkit for defining and handling
[9ca304a]34 authorizations. It is used for allowing unprivileged processes to
[30f82900]35 communicate with privileged processes.
[b84342d6]36 </para>
[9d3d8a8]37
[1f6d0c13]38 &lfs10_checked;
[27e62762]39
[9d3d8a8]40 <bridgehead renderas="sect3">Package Information</bridgehead>
41 <itemizedlist spacing="compact">
42 <listitem>
[b84342d6]43 <para>
44 Download (HTTP): <ulink url="&polkit-download-http;"/>
45 </para>
[9d3d8a8]46 </listitem>
47 <listitem>
[b84342d6]48 <para>
49 Download (FTP): <ulink url="&polkit-download-ftp;"/>
50 </para>
[9d3d8a8]51 </listitem>
52 <listitem>
[b84342d6]53 <para>
54 Download MD5 sum: &polkit-md5sum;
55 </para>
[9d3d8a8]56 </listitem>
57 <listitem>
[b84342d6]58 <para>
59 Download size: &polkit-size;
60 </para>
[9d3d8a8]61 </listitem>
62 <listitem>
[b84342d6]63 <para>
64 Estimated disk space required: &polkit-buildsize;
65 </para>
[9d3d8a8]66 </listitem>
67 <listitem>
[b84342d6]68 <para>
69 Estimated build time: &polkit-time;
70 </para>
[9d3d8a8]71 </listitem>
72 </itemizedlist>
[f47c6a6b]73
74 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
75 <itemizedlist spacing="compact">
[4a0b346]76 <listitem revision="sysv">
77 <para>
78 Recommended patch:
79 <ulink url="&patch-root;/polkit-&polkit-version;-fix_elogind_detection-1.patch"/>
80 </para>
81 </listitem>
[3b40dbb3]82 <listitem>
83 <para>
[f47c6a6b]84 Recommended file for tests:
85 <ulink url="https://gitlab.freedesktop.org/polkit/polkit/-/raw/0.117/test/polkitbackend/polkitbackendjsauthoritytest-wrapper.py"/>
[3b40dbb3]86 </para>
87 </listitem>
88 </itemizedlist>
[f47c6a6b]89
[01996ebb]90 <bridgehead renderas="sect3">Polkit Dependencies</bridgehead>
[9d3d8a8]91
92 <bridgehead renderas="sect4">Required</bridgehead>
[bb947c32]93 <para role="required">
[6d03f3e]94 <xref linkend="glib2"/> and
[8da5263]95 <xref linkend="js68"/>
[4c2be438]96 </para>
97
[51dfb3e]98 <bridgehead renderas="sect4">Recommended</bridgehead>
99 <para role="recommended">
100 <xref linkend="linux-pam"/><phrase revision="sysv"> and
101 <xref linkend="elogind"/></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
116
[4c2be438]117 <bridgehead renderas="sect4">Optional (Required if building GNOME)</bridgehead>
118 <para role="optional">
119 <xref linkend="gobject-introspection"/>
120 </para>
[9d3d8a8]121
122 <bridgehead renderas="sect4">Optional</bridgehead>
[bb947c32]123 <para role="optional">
[8da5263]124 <xref linkend="dbus-python"/> and
125 <xref linkend="python-dbusmock"/> (for tests),
[0d7900a]126 <xref linkend="DocBook"/>,
127 <xref linkend="docbook-xsl"/>,
[51dfb3e]128 <xref linkend="gtk-doc"/>, and
129 <xref linkend="libxslt"/>
[f586237]130 </para>
131
132 <bridgehead renderas="sect4" revision="systemd">Required Runtime Dependencies</bridgehead>
133 <para role="required" revision="systemd">
[96e9478]134 <xref role="runtime" linkend="systemd"/>
[4c2be438]135 </para>
[875b4070]136
[f13e9026]137 <bridgehead renderas="sect4" id="polkit-agent" xreflabel="Polkit Authentication Agent">
138 Optional Runtime Dependencies
139 </bridgehead>
[fee64868]140 <para role="optional">
141 One polkit authentication agent for using polkit in the graphical
142 environment:
143 <application>polkit-kde-agent</application> in
144 <xref role="runtime" linkend="plasma5-build"/> for KDE,
145 the agent built in
146 <xref role="runtime" linkend="gnome-shell"/> for GNOME3,
147 <xref role="runtime" linkend="polkit-gnome"/> for XFCE, and
148 <application>lxpolkit</application> in
149 <xref role="runtime" linkend="lxsession"/> for LXDE.
150 </para>
151
[875b4070]152 <note>
[b84342d6]153 <para>
[f586237]154 If <xref linkend="libxslt"/> is installed,
155 then <xref linkend="DocBook"/> and <xref linkend="docbook-xsl"/> are
156 required. If you have installed <xref linkend="libxslt"/>, but you do
157 not want to install any of the DocBook packages mentioned, you will
158 need to use <option>--disable-man-pages</option> in the instructions
159 below.
[b84342d6]160 </para>
[875b4070]161 </note>
[9d3d8a8]162
163 <para condition="html" role="usernotes">User Notes:
[37aba7f]164 <ulink url="&blfs-wiki;/polkit"/>
165 </para>
[9d3d8a8]166 </sect2>
167
168 <sect2 role="installation">
[01996ebb]169 <title>Installation of Polkit</title>
[9d3d8a8]170
[b84342d6]171 <para>
[01996ebb]172 There should be a dedicated user and group to take control
173 of the <command>polkitd</command> daemon after it is
174 started. Issue the following commands as the
175 <systemitem class="username">root</systemitem> user:
176 </para>
177
178<screen role="root"><userinput>groupadd -fg 27 polkitd &amp;&amp;
179useradd -c "PolicyKit Daemon Owner" -d /etc/polkit-1 -u 27 \
180 -g polkitd -s /bin/false polkitd</userinput></screen>
181
[f586237]182 <note revision="systemd">
183 <para>
184 When building <application>Polkit</application> with
185 <application>systemd</application> logind support, the
186 <command>configure</command> script explicitly checks if
187 system is booted using <application>systemd</application>.
188 This can cause problems if building the package in chroot,
189 where the <command>configure</command> would fail to
190 detect <application>systemd</application>. To workaround
191 the problem, simply run the following command:
192 </para>
193
194<screen><userinput>sed -i "s:/sys/fs/cgroup/systemd/:/sys:g" configure</userinput></screen>
195 </note>
[3b40dbb3]196
[4a0b346]197 <para revision="sysv">
198 Fix an issue introduced in recent <application>Polkit</application>
199 releases with elogind:
200 </para>
201
202<screen revision="sysv"><userinput>patch -Np1 -i ../polkit-&polkit-version;-fix_elogind_detection-1.patch &amp;&amp;
203autoreconf -fi</userinput></screen>
204
[01996ebb]205 <para>
206 Install <application>Polkit</application> by running the following
[37aba7f]207 commands:
[b84342d6]208 </para>
[9d3d8a8]209
[9da30c5]210<screen revision="systemd"><userinput>./configure --prefix=/usr \
[55c80c6]211 --sysconfdir=/etc \
212 --localstatedir=/var \
213 --disable-static \
214 --with-os-type=LFS &amp;&amp;
[f586237]215make</userinput></screen>
216
[51dfb3e]217<screen revision="sysv"><userinput>./configure --prefix=/usr \
218 --sysconfdir=/etc \
219 --localstatedir=/var \
220 --disable-static \
[fee64868]221 --with-os-type=LFS \
[4a0b346]222 --disable-libsystemd-login &amp;&amp;
[51dfb3e]223make</userinput></screen>
224
[b84342d6]225 <para>
[f47c6a6b]226 To test the results, first ensure that the system
227 <application>D-Bus</application> daemon is running and
228 restore a missing file. Then run the tests:
[b84342d6]229 </para>
[9d3d8a8]230
[6e017f08]231<screen remap="test"><userinput>cp ../polkitbackendjsauthoritytest-wrapper.py test/polkitbackend/ &amp;&amp;
[f47c6a6b]232chmod 755 test/polkitbackend/polkitbackendjsauthoritytest-wrapper.py &amp;&amp;
233make check</userinput></screen>
234
[b84342d6]235 <para>
236 Now, as the <systemitem class="username">root</systemitem> user:
237 </para>
[9d3d8a8]238
239<screen role="root"><userinput>make install</userinput></screen>
240
241 </sect2>
242
243 <sect2 role="commands">
244 <title>Command Explanations</title>
245
[4a0b346]246 <para revision="sysv">
247 <parameter>--disable-libsystemd-login</parameter>: This switch forces
248 polkit to build with elogind support (if available) rather than
249 systemd-logind.
250 </para>
251
[51dfb3e]252 <para>
[f586237]253 <option>--with-authfw=shadow</option>: This switch enables the
254 package to use the <application>Shadow</application> rather than the
255 <application>Linux PAM</application> Authentication framework. Use it
256 if you have not installed <application>Linux PAM</application>.
[b84342d6]257 </para>
258
259 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
260 href="../../xincludes/static-libraries.xml"/>
[875b4070]261
[e05cd03f]262 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
[51dfb3e]263 href="../../xincludes/gtk-doc-rebuild.xml"/>
264
[9d3d8a8]265 </sect2>
266
[a6bd736]267 <sect2 role="configuration">
[01996ebb]268 <title>Configuring Polkit</title>
[a6bd736]269
270 <sect3>
271 <title>PAM Configuration</title>
272
273 <note>
[b84342d6]274 <para>
[01996ebb]275 If you did not build <application>Polkit</application> with
[b84342d6]276 <application>Linux PAM</application> support, you can skip this section.
[a6bd736]277 </para>
278 </note>
279
[b84342d6]280 <para>
[0d7900a]281 If you have built <application>Polkit</application> with
282 <application>Linux PAM</application> support, you need to modify
[9ca304a]283 the default PAM configuration file which was installed by default to get
284 <application>Polkit</application> to work correctly with BLFS. Issue the
285 following commands as the <systemitem class="username">root</systemitem>
[b84342d6]286 user to create the configuration file for <application>Linux PAM</application>:
[a6bd736]287 </para>
288
289<screen role="root"><userinput>cat &gt; /etc/pam.d/polkit-1 &lt;&lt; "EOF"
290<literal># Begin /etc/pam.d/polkit-1
291
292auth include system-auth
293account include system-account
294password include system-password
295session include system-session
296
297# End /etc/pam.d/polkit-1</literal>
298EOF</userinput></screen>
299
300 </sect3>
301
302 </sect2>
303
[9d3d8a8]304 <sect2 role="content">
305 <title>Contents</title>
306
307 <segmentedlist>
308 <segtitle>Installed Programs</segtitle>
309 <segtitle>Installed Libraries</segtitle>
310 <segtitle>Installed Directories</segtitle>
311
312 <seglistitem>
[b84342d6]313 <seg>
[f342c0a9]314 pkaction, pkcheck, pk-example-frobnicate, pkexec,
315 pkttyagent and polkitd
[b84342d6]316 </seg>
317 <seg>
[0d7900a]318 libpolkit-agent-1.so and
[b84342d6]319 libpolkit-gobject-1.so
320 </seg>
[028759b]321 <seg>
[01996ebb]322 /etc/polkit-1,
323 /usr/include/polkit-1,
324 /usr/lib/polkit-1,
325 /usr/share/gtk-doc/html/polkit-1 and
[028759b]326 /usr/share/polkit-1
[b84342d6]327 </seg>
[9d3d8a8]328 </seglistitem>
329 </segmentedlist>
330
331 <variablelist>
332 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
333 <?dbfo list-presentation="list"?>
334 <?dbhtml list-presentation="table"?>
335
336 <varlistentry id="pkaction">
337 <term><command>pkaction</command></term>
338 <listitem>
[b84342d6]339 <para>
340 is used to obtain information about registered PolicyKit actions.
341 </para>
[9d3d8a8]342 <indexterm zone="polkit pkaction">
343 <primary sortas="b-pkaction">pkaction</primary>
344 </indexterm>
345 </listitem>
346 </varlistentry>
347
348 <varlistentry id="pkcheck">
349 <term><command>pkcheck</command></term>
350 <listitem>
[b84342d6]351 <para>
352 is used to check whether a process is authorized for action.
353 </para>
[9d3d8a8]354 <indexterm zone="polkit pkcheck">
355 <primary sortas="b-pkcheck">pkcheck</primary>
356 </indexterm>
357 </listitem>
358 </varlistentry>
359
[72d90b67]360 <varlistentry id="pk-example-frobnicate">
361 <term><command>pk-example-frobnicate</command></term>
362 <listitem>
363 <para>
364 is an example program to test the <command>pkexec</command>
365 command.
366 </para>
367 <indexterm zone="polkit pk-example-frobnicate">
368 <primary sortas="b-pk-example-frobnicate">pk-example-frobnicate</primary>
369 </indexterm>
370 </listitem>
371 </varlistentry>
372
[9d3d8a8]373 <varlistentry id="pkexec">
374 <term><command>pkexec</command></term>
375 <listitem>
[b84342d6]376 <para>
377 allows an authorized user to execute a command as another user.
378 </para>
[9d3d8a8]379 <indexterm zone="polkit pkexec">
380 <primary sortas="b-pkexec">pkexec</primary>
381 </indexterm>
382 </listitem>
383 </varlistentry>
384
[b84342d6]385 <varlistentry id="pkttyagent">
386 <term><command>pkttyagent</command></term>
[9d3d8a8]387 <listitem>
[b84342d6]388 <para>
389 is used to start a textual authentication agent for the subject.
390 </para>
391 <indexterm zone="polkit pkttyagent">
392 <primary sortas="b-pkttyagent">pkttyagent</primary>
[9d3d8a8]393 </indexterm>
394 </listitem>
[b84342d6]395 </varlistentry>
[9d3d8a8]396
[875b4070]397 <varlistentry id="polkitd">
[9d3d8a8]398 <term><command>polkitd</command></term>
399 <listitem>
[b84342d6]400 <para>
[0d7900a]401 provides the org.freedesktop.PolicyKit1 <application>D-Bus</application>
[b84342d6]402 service on the system message bus.
403 </para>
[875b4070]404 <indexterm zone="polkit polkitd">
[9d3d8a8]405 <primary sortas="b-polkitd">polkitd</primary>
406 </indexterm>
407 </listitem>
408 </varlistentry>
409
410 <varlistentry id="libpolkit-agent-1">
[b84342d6]411 <term><filename class='libraryfile'>libpolkit-agent-1.so</filename></term>
[9d3d8a8]412 <listitem>
[b84342d6]413 <para>
[01996ebb]414 contains the <application>Polkit</application> authentication
[b84342d6]415 agent API functions.
416 </para>
[9d3d8a8]417 <indexterm zone="polkit libpolkit-agent-1">
[b84342d6]418 <primary sortas="c-libpolkit-agent-1">libpolkit-agent-1.so</primary>
[9d3d8a8]419 </indexterm>
420 </listitem>
421 </varlistentry>
422
423 <varlistentry id="libpolkit-gobject-1">
[b84342d6]424 <term><filename class='libraryfile'>libpolkit-gobject-1.so</filename></term>
[9d3d8a8]425 <listitem>
[b84342d6]426 <para>
[01996ebb]427 contains the <application>Polkit</application> authorization API functions.
[b84342d6]428 </para>
[9d3d8a8]429 <indexterm zone="polkit libpolkit-gobject-1">
[b84342d6]430 <primary sortas="c-libpolkit-gobject-1">libpolkit-gobject-1.so</primary>
[9d3d8a8]431 </indexterm>
432 </listitem>
433 </varlistentry>
434
435 </variablelist>
436
437 </sect2>
438
439</sect1>
Note: See TracBrowser for help on using the repository browser.