source: postlfs/security/polkit.xml@ fee64868

10.0 10.1 11.0 9.1 ken/refactor-virt lazarus qt5new trunk upgradedb xry111/git-date xry111/git-date-for-trunk xry111/git-date-test
Last change on this file since fee64868 was fee64868, checked in by Xi Ruoyao <xry111@…>, 2 years ago

clarify polkit agent deps

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

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