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
Line 
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
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)">
13]>
14
15<sect1 id="polkit" xreflabel="Polkit-&polkit-version;">
16 <?dbhtml filename="polkit.html"?>
17
18 <sect1info>
19 <othername>$LastChangedBy$</othername>
20 <date>$Date$</date>
21 </sect1info>
22
23 <title>Polkit-&polkit-version;</title>
24
25 <indexterm zone="polkit">
26 <primary sortas="a-Polkit">Polkit</primary>
27 </indexterm>
28
29 <sect2 role="package">
30 <title>Introduction to Polkit</title>
31
32 <para>
33 <application>Polkit</application> is a toolkit for defining and handling
34 authorizations. It is used for allowing unprivileged processes to
35 communicate with privileged processes.
36 </para>
37
38 &lfs10_checked;
39
40 <bridgehead renderas="sect3">Package Information</bridgehead>
41 <itemizedlist spacing="compact">
42 <listitem>
43 <para>
44 Download (HTTP): <ulink url="&polkit-download-http;"/>
45 </para>
46 </listitem>
47 <listitem>
48 <para>
49 Download (FTP): <ulink url="&polkit-download-ftp;"/>
50 </para>
51 </listitem>
52 <listitem>
53 <para>
54 Download MD5 sum: &polkit-md5sum;
55 </para>
56 </listitem>
57 <listitem>
58 <para>
59 Download size: &polkit-size;
60 </para>
61 </listitem>
62 <listitem>
63 <para>
64 Estimated disk space required: &polkit-buildsize;
65 </para>
66 </listitem>
67 <listitem>
68 <para>
69 Estimated build time: &polkit-time;
70 </para>
71 </listitem>
72 </itemizedlist>
73
74 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
75 <itemizedlist spacing="compact">
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>
82 <listitem>
83 <para>
84 Recommended file for tests:
85 <ulink url="https://gitlab.freedesktop.org/polkit/polkit/-/raw/0.117/test/polkitbackend/polkitbackendjsauthoritytest-wrapper.py"/>
86 </para>
87 </listitem>
88 </itemizedlist>
89
90 <bridgehead renderas="sect3">Polkit Dependencies</bridgehead>
91
92 <bridgehead renderas="sect4">Required</bridgehead>
93 <para role="required">
94 <xref linkend="glib2"/> and
95 <xref linkend="js68"/>
96 </para>
97
98 <bridgehead renderas="sect4">Recommended</bridgehead>
99 <para role="recommended">
100 <xref linkend="linux-pam"/><phrase revision="sysv"> and
101 <xref linkend="elogind"/></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
117 <bridgehead renderas="sect4">Optional (Required if building GNOME)</bridgehead>
118 <para role="optional">
119 <xref linkend="gobject-introspection"/>
120 </para>
121
122 <bridgehead renderas="sect4">Optional</bridgehead>
123 <para role="optional">
124 <xref linkend="dbus-python"/> and
125 <xref linkend="python-dbusmock"/> (for tests),
126 <xref linkend="DocBook"/>,
127 <xref linkend="docbook-xsl"/>,
128 <xref linkend="gtk-doc"/>, and
129 <xref linkend="libxslt"/>
130 </para>
131
132 <bridgehead renderas="sect4" revision="systemd">Required Runtime Dependencies</bridgehead>
133 <para role="required" revision="systemd">
134 <xref role="runtime" linkend="systemd"/>
135 </para>
136
137 <bridgehead renderas="sect4" id="polkit-agent" xreflabel="Polkit Authentication Agent">
138 Optional Runtime Dependencies
139 </bridgehead>
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
152 <note>
153 <para>
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.
160 </para>
161 </note>
162
163 <para condition="html" role="usernotes">User Notes:
164 <ulink url="&blfs-wiki;/polkit"/>
165 </para>
166 </sect2>
167
168 <sect2 role="installation">
169 <title>Installation of Polkit</title>
170
171 <para>
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
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>
196
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
205 <para>
206 Install <application>Polkit</application> by running the following
207 commands:
208 </para>
209
210<screen revision="systemd"><userinput>./configure --prefix=/usr \
211 --sysconfdir=/etc \
212 --localstatedir=/var \
213 --disable-static \
214 --with-os-type=LFS &amp;&amp;
215make</userinput></screen>
216
217<screen revision="sysv"><userinput>./configure --prefix=/usr \
218 --sysconfdir=/etc \
219 --localstatedir=/var \
220 --disable-static \
221 --with-os-type=LFS \
222 --disable-libsystemd-login &amp;&amp;
223make</userinput></screen>
224
225 <para>
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:
229 </para>
230
231<screen remap="test"><userinput>cp ../polkitbackendjsauthoritytest-wrapper.py test/polkitbackend/ &amp;&amp;
232chmod 755 test/polkitbackend/polkitbackendjsauthoritytest-wrapper.py &amp;&amp;
233make check</userinput></screen>
234
235 <para>
236 Now, as the <systemitem class="username">root</systemitem> user:
237 </para>
238
239<screen role="root"><userinput>make install</userinput></screen>
240
241 </sect2>
242
243 <sect2 role="commands">
244 <title>Command Explanations</title>
245
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
252 <para>
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>.
257 </para>
258
259 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
260 href="../../xincludes/static-libraries.xml"/>
261
262 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
263 href="../../xincludes/gtk-doc-rebuild.xml"/>
264
265 </sect2>
266
267 <sect2 role="configuration">
268 <title>Configuring Polkit</title>
269
270 <sect3>
271 <title>PAM Configuration</title>
272
273 <note>
274 <para>
275 If you did not build <application>Polkit</application> with
276 <application>Linux PAM</application> support, you can skip this section.
277 </para>
278 </note>
279
280 <para>
281 If you have built <application>Polkit</application> with
282 <application>Linux PAM</application> support, you need to modify
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>
286 user to create the configuration file for <application>Linux PAM</application>:
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
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>
313 <seg>
314 pkaction, pkcheck, pk-example-frobnicate, pkexec,
315 pkttyagent and polkitd
316 </seg>
317 <seg>
318 libpolkit-agent-1.so and
319 libpolkit-gobject-1.so
320 </seg>
321 <seg>
322 /etc/polkit-1,
323 /usr/include/polkit-1,
324 /usr/lib/polkit-1,
325 /usr/share/gtk-doc/html/polkit-1 and
326 /usr/share/polkit-1
327 </seg>
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>
339 <para>
340 is used to obtain information about registered PolicyKit actions.
341 </para>
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>
351 <para>
352 is used to check whether a process is authorized for action.
353 </para>
354 <indexterm zone="polkit pkcheck">
355 <primary sortas="b-pkcheck">pkcheck</primary>
356 </indexterm>
357 </listitem>
358 </varlistentry>
359
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
373 <varlistentry id="pkexec">
374 <term><command>pkexec</command></term>
375 <listitem>
376 <para>
377 allows an authorized user to execute a command as another user.
378 </para>
379 <indexterm zone="polkit pkexec">
380 <primary sortas="b-pkexec">pkexec</primary>
381 </indexterm>
382 </listitem>
383 </varlistentry>
384
385 <varlistentry id="pkttyagent">
386 <term><command>pkttyagent</command></term>
387 <listitem>
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>
393 </indexterm>
394 </listitem>
395 </varlistentry>
396
397 <varlistentry id="polkitd">
398 <term><command>polkitd</command></term>
399 <listitem>
400 <para>
401 provides the org.freedesktop.PolicyKit1 <application>D-Bus</application>
402 service on the system message bus.
403 </para>
404 <indexterm zone="polkit polkitd">
405 <primary sortas="b-polkitd">polkitd</primary>
406 </indexterm>
407 </listitem>
408 </varlistentry>
409
410 <varlistentry id="libpolkit-agent-1">
411 <term><filename class='libraryfile'>libpolkit-agent-1.so</filename></term>
412 <listitem>
413 <para>
414 contains the <application>Polkit</application> authentication
415 agent API functions.
416 </para>
417 <indexterm zone="polkit libpolkit-agent-1">
418 <primary sortas="c-libpolkit-agent-1">libpolkit-agent-1.so</primary>
419 </indexterm>
420 </listitem>
421 </varlistentry>
422
423 <varlistentry id="libpolkit-gobject-1">
424 <term><filename class='libraryfile'>libpolkit-gobject-1.so</filename></term>
425 <listitem>
426 <para>
427 contains the <application>Polkit</application> authorization API functions.
428 </para>
429 <indexterm zone="polkit libpolkit-gobject-1">
430 <primary sortas="c-libpolkit-gobject-1">libpolkit-gobject-1.so</primary>
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.