source: postlfs/security/polkit.xml@ 641a327

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 641a327 was 641a327, checked in by Ken Moffat <ken@…>, 3 years ago

Tags

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