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 "a6efe21d021fafe4191ee30331ef801c">
|
---|
10 | <!ENTITY polkit-size "1.6 MB">
|
---|
11 | <!ENTITY polkit-buildsize "12 MB">
|
---|
12 | <!ENTITY polkit-time "0.1 SBU (Using parallelism=4)">
|
---|
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 | &lfs110a_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 | <!-- With the move to meson, the patch is no longer needed
|
---|
74 | <bridgehead renderas="sect3"
|
---|
75 | 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 |
|
---|
86 | <bridgehead renderas="sect3">Polkit Dependencies</bridgehead>
|
---|
87 |
|
---|
88 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
89 | <para role="required">
|
---|
90 | <xref linkend="glib2"/> and
|
---|
91 | <xref linkend="js78"/>
|
---|
92 | </para>
|
---|
93 |
|
---|
94 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
95 | <para role="recommended">
|
---|
96 | <xref linkend="gobject-introspection"/>,
|
---|
97 | <xref linkend="libxslt"/>,
|
---|
98 | <xref linkend="linux-pam"/>
|
---|
99 | <phrase revision="sysv">
|
---|
100 | and <xref role="first" linkend="elogind"/>
|
---|
101 | </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 | <!-- Due to the fact that meson will not autodetect g-i and
|
---|
118 | has it set to required unless you pass an option, and the likelihood
|
---|
119 | of users ignoring a command explanation and then sending in mails
|
---|
120 | regarding KDE or GNOME not working after installing polkit, let's move
|
---|
121 | it to recommended. See #15640 for logic
|
---|
122 | <bridgehead renderas="sect4">Optional (Required if building GNOME)</bridgehead>
|
---|
123 | <para role="optional">
|
---|
124 | <xref linkend="gobject-introspection"/>
|
---|
125 | </para>
|
---|
126 | -->
|
---|
127 |
|
---|
128 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
129 | <para role="optional">
|
---|
130 | <xref linkend="dbus-python"/> and
|
---|
131 | <xref linkend="python-dbusmock"/> (for tests), and
|
---|
132 | <!--<xref linkend="DocBook"/>, (Part of libxslt's chain)
|
---|
133 | <xref linkend="docbook-xsl"/>,-->
|
---|
134 | <xref linkend="gtk-doc"/>
|
---|
135 | </para>
|
---|
136 |
|
---|
137 | <bridgehead renderas="sect4" revision="systemd">Required Runtime Dependencies</bridgehead>
|
---|
138 | <para role="required" revision="systemd">
|
---|
139 | <xref role="runtime" linkend="systemd"/>
|
---|
140 | </para>
|
---|
141 |
|
---|
142 | <bridgehead renderas="sect4" id="polkit-agent" xreflabel="Polkit Authentication Agent">
|
---|
143 | Optional Runtime Dependencies
|
---|
144 | </bridgehead>
|
---|
145 | <para role="optional">
|
---|
146 | One polkit authentication agent for using polkit in the graphical
|
---|
147 | environment:
|
---|
148 | <application>polkit-kde-agent</application> in
|
---|
149 | <xref role="runtime" linkend="plasma5-build"/> for KDE,
|
---|
150 | the agent built in
|
---|
151 | <xref role="runtime" linkend="gnome-shell"/> for GNOME3,
|
---|
152 | <xref role="runtime" linkend="polkit-gnome"/> for XFCE, and
|
---|
153 | <application>lxpolkit</application> in
|
---|
154 | <xref role="runtime" linkend="lxsession"/> for LXDE.
|
---|
155 | </para>
|
---|
156 |
|
---|
157 | <note>
|
---|
158 | <para>
|
---|
159 | If <xref linkend="libxslt"/> is installed,
|
---|
160 | then <xref linkend="DocBook"/> and <xref linkend="docbook-xsl"/> are
|
---|
161 | required. If you have installed <xref linkend="libxslt"/>, but you do
|
---|
162 | not want to install any of the DocBook packages mentioned, you will
|
---|
163 | need to use <option>-Dman=false</option> in the instructions
|
---|
164 | below.
|
---|
165 | </para>
|
---|
166 | </note>
|
---|
167 |
|
---|
168 | <para condition="html" role="usernotes">User Notes:
|
---|
169 | <ulink url="&blfs-wiki;/polkit"/>
|
---|
170 | </para>
|
---|
171 | </sect2>
|
---|
172 |
|
---|
173 | <sect2 role="installation">
|
---|
174 | <title>Installation of Polkit</title>
|
---|
175 |
|
---|
176 | <para>
|
---|
177 | There should be a dedicated user and group to take control
|
---|
178 | of the <command>polkitd</command> daemon after it is
|
---|
179 | started. Issue the following commands as the
|
---|
180 | <systemitem class="username">root</systemitem> user:
|
---|
181 | </para>
|
---|
182 |
|
---|
183 | <screen role="root"><userinput>groupadd -fg 27 polkitd &&
|
---|
184 | useradd -c "PolicyKit Daemon Owner" -d /etc/polkit-1 -u 27 \
|
---|
185 | -g polkitd -s /bin/false polkitd</userinput></screen>
|
---|
186 |
|
---|
187 | <!-- All of this is irrelevant with meson
|
---|
188 | <note revision="systemd">
|
---|
189 | <para>
|
---|
190 | When building <application>Polkit</application> with
|
---|
191 | <application>systemd</application> logind support, the
|
---|
192 | <command>configure</command> script explicitly checks if
|
---|
193 | system is booted using <application>systemd</application>.
|
---|
194 | This can cause problems if building the package in chroot,
|
---|
195 | where the <command>configure</command> would fail to
|
---|
196 | detect <application>systemd</application>. To workaround
|
---|
197 | the problem, simply run the following command:
|
---|
198 | </para>
|
---|
199 |
|
---|
200 | <screen><userinput>sed -i "s:/sys/fs/cgroup/systemd/:/sys:g" configure</userinput></screen>
|
---|
201 | </note>
|
---|
202 |
|
---|
203 | <para revision="sysv">
|
---|
204 | Fix an issue introduced in recent <application>Polkit</application>
|
---|
205 | releases with elogind:
|
---|
206 | </para>
|
---|
207 |
|
---|
208 | <screen revision="sysv"><userinput>patch -Np1 -i ../polkit-&polkit-version;-fix_elogind_detection-1.patch &&
|
---|
209 | autoreconf -fv</userinput></screen>
|
---|
210 | -->
|
---|
211 |
|
---|
212 | <para>
|
---|
213 | First, fix problems with setting permissions during installation and with
|
---|
214 | meson-0.60.0:
|
---|
215 | </para>
|
---|
216 |
|
---|
217 | <screen><userinput remap="pre">sed '/0,/s/^/#/' -i meson_post_install.py &&
|
---|
218 | sed '/policy,/d' -i actions/meson.build \
|
---|
219 | -i src/examples/meson.build</userinput></screen>
|
---|
220 | <para>
|
---|
221 | Install <application>Polkit</application> by running the following
|
---|
222 | commands:
|
---|
223 | </para>
|
---|
224 |
|
---|
225 | <screen revision="systemd"><userinput>mkdir build &&
|
---|
226 | cd build &&
|
---|
227 |
|
---|
228 | meson --prefix=/usr \
|
---|
229 | -Dman=true \
|
---|
230 | -Dsession_tracking=libsystemd-login \
|
---|
231 | --buildtype=release \
|
---|
232 | .. &&
|
---|
233 | ninja</userinput></screen>
|
---|
234 |
|
---|
235 | <screen revision="sysv"><userinput>mkdir build &&
|
---|
236 | cd build &&
|
---|
237 |
|
---|
238 | meson --prefix=/usr \
|
---|
239 | -Dman=true \
|
---|
240 | -Dsession_tracking=libelogind \
|
---|
241 | -Dsystemdsystemunitdir=/tmp \
|
---|
242 | --buildtype=release \
|
---|
243 | .. &&
|
---|
244 | ninja</userinput></screen>
|
---|
245 |
|
---|
246 | <!--
|
---|
247 | <para>
|
---|
248 | To test the results, first ensure that the system
|
---|
249 | <application>D-Bus</application> daemon is running.
|
---|
250 | Then run <command>make check</command>.
|
---|
251 | </para>
|
---|
252 | -->
|
---|
253 |
|
---|
254 | <!-- The subprojects directory which contains a wrapper for 'mocklibc'
|
---|
255 | is not shipped in the tarball like it should be. Whenever that is
|
---|
256 | fixed, -Dtests=true and ninja test is the ticket. -->
|
---|
257 |
|
---|
258 | <para>
|
---|
259 | This package does not ship with a working test suite.
|
---|
260 | </para>
|
---|
261 |
|
---|
262 | <para>
|
---|
263 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
264 | </para>
|
---|
265 |
|
---|
266 | <screen role="root" revision="systemd"><userinput>ninja install</userinput></screen>
|
---|
267 |
|
---|
268 | <screen role="root" revision="sysv"><userinput>ninja install &&
|
---|
269 | rm -v /tmp/*.service</userinput></screen>
|
---|
270 |
|
---|
271 | </sect2>
|
---|
272 |
|
---|
273 | <sect2 role="commands">
|
---|
274 | <title>Command Explanations</title>
|
---|
275 |
|
---|
276 | <!--
|
---|
277 | <para revision="sysv">
|
---|
278 | <parameter>- -disable-libsystemd-login</parameter>: This switch forces
|
---|
279 | polkit to build with elogind support (if available) rather than
|
---|
280 | systemd-logind.
|
---|
281 | </para>
|
---|
282 |
|
---|
283 |
|
---|
284 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
285 | href="../../xincludes/static-libraries.xml"/>
|
---|
286 | -->
|
---|
287 |
|
---|
288 | <para>
|
---|
289 | <option>-Dauthfw=shadow</option>: This switch enables the
|
---|
290 | package to use the <application>Shadow</application> rather than the
|
---|
291 | <application>Linux PAM</application> Authentication framework. Use it
|
---|
292 | if you have not installed <application>Linux PAM</application>.
|
---|
293 | </para>
|
---|
294 |
|
---|
295 | <!--
|
---|
296 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
297 | href="../../xincludes/gtk-doc-rebuild.xml"/>
|
---|
298 | -->
|
---|
299 |
|
---|
300 | <para>
|
---|
301 | <option>-Dintrospection=false</option>: Use this option if you are certain
|
---|
302 | that you do not need gobject-introspection files for polkit, or do not have
|
---|
303 | gobject-introspection installed.
|
---|
304 | </para>
|
---|
305 |
|
---|
306 | <para>
|
---|
307 | <option>-Dman=false</option>: Use this option to disable generating and
|
---|
308 | installing manual pages. This is useful if libxslt is not installed.
|
---|
309 | </para>
|
---|
310 |
|
---|
311 | <para>
|
---|
312 | <option>-Dexamples=true</option>: Use this option to build the example
|
---|
313 | programs.
|
---|
314 | </para>
|
---|
315 |
|
---|
316 | <para>
|
---|
317 | <option>-Dgtk_doc=true</option>: Use this option to enable building and
|
---|
318 | installing the API documentation.
|
---|
319 | </para>
|
---|
320 |
|
---|
321 | </sect2>
|
---|
322 |
|
---|
323 | <sect2 role="configuration">
|
---|
324 | <title>Configuring Polkit</title>
|
---|
325 |
|
---|
326 | <sect3>
|
---|
327 | <title>PAM Configuration</title>
|
---|
328 |
|
---|
329 | <note>
|
---|
330 | <para>
|
---|
331 | If you did not build <application>Polkit</application> with
|
---|
332 | <application>Linux PAM</application> support, you can skip this
|
---|
333 | section.
|
---|
334 | </para>
|
---|
335 | </note>
|
---|
336 |
|
---|
337 | <para>
|
---|
338 | If you have built <application>Polkit</application> with
|
---|
339 | <application>Linux PAM</application> support, you need to modify
|
---|
340 | the default PAM configuration file which was installed by default to get
|
---|
341 | <application>Polkit</application> to work correctly with BLFS. Issue the
|
---|
342 | following commands as the <systemitem class="username">root</systemitem>
|
---|
343 | user to create the configuration file for <application>Linux PAM</application>:
|
---|
344 | </para>
|
---|
345 |
|
---|
346 | <screen role="root"><userinput>cat > /etc/pam.d/polkit-1 << "EOF"
|
---|
347 | <literal># Begin /etc/pam.d/polkit-1
|
---|
348 |
|
---|
349 | auth include system-auth
|
---|
350 | account include system-account
|
---|
351 | password include system-password
|
---|
352 | session include system-session
|
---|
353 |
|
---|
354 | # End /etc/pam.d/polkit-1</literal>
|
---|
355 | EOF</userinput></screen>
|
---|
356 |
|
---|
357 | </sect3>
|
---|
358 |
|
---|
359 | </sect2>
|
---|
360 |
|
---|
361 | <sect2 role="content">
|
---|
362 | <title>Contents</title>
|
---|
363 |
|
---|
364 | <segmentedlist>
|
---|
365 | <segtitle>Installed Programs</segtitle>
|
---|
366 | <segtitle>Installed Libraries</segtitle>
|
---|
367 | <segtitle>Installed Directories</segtitle>
|
---|
368 |
|
---|
369 | <seglistitem>
|
---|
370 | <seg>
|
---|
371 | pkaction, pkcheck, <!--pk-example-frobnicate,--> pkexec,
|
---|
372 | pkttyagent and polkitd
|
---|
373 | </seg>
|
---|
374 | <seg>
|
---|
375 | libpolkit-agent-1.so and
|
---|
376 | libpolkit-gobject-1.so
|
---|
377 | </seg>
|
---|
378 | <seg>
|
---|
379 | /etc/polkit-1,
|
---|
380 | /usr/include/polkit-1,
|
---|
381 | /usr/lib/polkit-1,
|
---|
382 | /usr/share/gtk-doc/html/polkit-1 and
|
---|
383 | /usr/share/polkit-1
|
---|
384 | </seg>
|
---|
385 | </seglistitem>
|
---|
386 | </segmentedlist>
|
---|
387 |
|
---|
388 | <variablelist>
|
---|
389 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
390 | <?dbfo list-presentation="list"?>
|
---|
391 | <?dbhtml list-presentation="table"?>
|
---|
392 |
|
---|
393 | <varlistentry id="pkaction">
|
---|
394 | <term><command>pkaction</command></term>
|
---|
395 | <listitem>
|
---|
396 | <para>
|
---|
397 | is used to obtain information about registered PolicyKit actions
|
---|
398 | </para>
|
---|
399 | <indexterm zone="polkit pkaction">
|
---|
400 | <primary sortas="b-pkaction">pkaction</primary>
|
---|
401 | </indexterm>
|
---|
402 | </listitem>
|
---|
403 | </varlistentry>
|
---|
404 |
|
---|
405 | <varlistentry id="pkcheck">
|
---|
406 | <term><command>pkcheck</command></term>
|
---|
407 | <listitem>
|
---|
408 | <para>
|
---|
409 | is used to check whether a process is authorized for action
|
---|
410 | </para>
|
---|
411 | <indexterm zone="polkit pkcheck">
|
---|
412 | <primary sortas="b-pkcheck">pkcheck</primary>
|
---|
413 | </indexterm>
|
---|
414 | </listitem>
|
---|
415 | </varlistentry>
|
---|
416 |
|
---|
417 | <!--
|
---|
418 | <varlistentry id="pk-example-frobnicate">
|
---|
419 | <term><command>pk-example-frobnicate</command></term>
|
---|
420 | <listitem>
|
---|
421 | <para>
|
---|
422 | is an example program to test the <command>pkexec</command>
|
---|
423 | command
|
---|
424 | </para>
|
---|
425 | <indexterm zone="polkit pk-example-frobnicate">
|
---|
426 | <primary sortas="b-pk-example-frobnicate">pk-example-frobnicate</primary>
|
---|
427 | </indexterm>
|
---|
428 | </listitem>
|
---|
429 | </varlistentry>
|
---|
430 | -->
|
---|
431 |
|
---|
432 | <varlistentry id="pkexec">
|
---|
433 | <term><command>pkexec</command></term>
|
---|
434 | <listitem>
|
---|
435 | <para>
|
---|
436 | allows an authorized user to execute a command as another user
|
---|
437 | </para>
|
---|
438 | <indexterm zone="polkit pkexec">
|
---|
439 | <primary sortas="b-pkexec">pkexec</primary>
|
---|
440 | </indexterm>
|
---|
441 | </listitem>
|
---|
442 | </varlistentry>
|
---|
443 |
|
---|
444 | <varlistentry id="pkttyagent">
|
---|
445 | <term><command>pkttyagent</command></term>
|
---|
446 | <listitem>
|
---|
447 | <para>
|
---|
448 | is used to start a textual authentication agent for the subject
|
---|
449 | </para>
|
---|
450 | <indexterm zone="polkit pkttyagent">
|
---|
451 | <primary sortas="b-pkttyagent">pkttyagent</primary>
|
---|
452 | </indexterm>
|
---|
453 | </listitem>
|
---|
454 | </varlistentry>
|
---|
455 |
|
---|
456 | <varlistentry id="polkitd">
|
---|
457 | <term><command>polkitd</command></term>
|
---|
458 | <listitem>
|
---|
459 | <para>
|
---|
460 | provides the org.freedesktop.PolicyKit1 <application>D-Bus</application>
|
---|
461 | service on the system message bus
|
---|
462 | </para>
|
---|
463 | <indexterm zone="polkit polkitd">
|
---|
464 | <primary sortas="b-polkitd">polkitd</primary>
|
---|
465 | </indexterm>
|
---|
466 | </listitem>
|
---|
467 | </varlistentry>
|
---|
468 |
|
---|
469 | <varlistentry id="libpolkit-agent-1">
|
---|
470 | <term><filename class="libraryfile">libpolkit-agent-1.so</filename></term>
|
---|
471 | <listitem>
|
---|
472 | <para>
|
---|
473 | contains the <application>Polkit</application> authentication
|
---|
474 | agent API functions
|
---|
475 | </para>
|
---|
476 | <indexterm zone="polkit libpolkit-agent-1">
|
---|
477 | <primary sortas="c-libpolkit-agent-1">libpolkit-agent-1.so</primary>
|
---|
478 | </indexterm>
|
---|
479 | </listitem>
|
---|
480 | </varlistentry>
|
---|
481 |
|
---|
482 | <varlistentry id="libpolkit-gobject-1">
|
---|
483 | <term><filename class="libraryfile">libpolkit-gobject-1.so</filename></term>
|
---|
484 | <listitem>
|
---|
485 | <para>
|
---|
486 | contains the <application>Polkit</application> authorization API functions
|
---|
487 | </para>
|
---|
488 | <indexterm zone="polkit libpolkit-gobject-1">
|
---|
489 | <primary sortas="c-libpolkit-gobject-1">libpolkit-gobject-1.so</primary>
|
---|
490 | </indexterm>
|
---|
491 | </listitem>
|
---|
492 | </varlistentry>
|
---|
493 |
|
---|
494 | </variablelist>
|
---|
495 |
|
---|
496 | </sect2>
|
---|
497 |
|
---|
498 | </sect1>
|
---|