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 | &lfs91_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>
|
---|
77 | <para>
|
---|
78 | Recommended file for tests:
|
---|
79 | <ulink url="https://gitlab.freedesktop.org/polkit/polkit/-/raw/0.117/test/polkitbackend/polkitbackendjsauthoritytest-wrapper.py"/>
|
---|
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="js68"/>
|
---|
90 | </para>
|
---|
91 |
|
---|
92 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
93 | <para role="recommended">
|
---|
94 | <xref linkend="linux-pam"/><phrase revision="sysv"> and
|
---|
95 | <xref linkend="elogind"/></phrase>
|
---|
96 | </para>
|
---|
97 |
|
---|
98 | <note>
|
---|
99 | <para>
|
---|
100 | Since <phrase revision="sysv"><command>elogind</command></phrase>
|
---|
101 | <phrase revision="systemd"><command>systemd-logind</command></phrase>
|
---|
102 | uses PAM to register user sessions, it is a good idea to build
|
---|
103 | <application>Polkit</application> with PAM support so
|
---|
104 | <phrase revision="sysv"><command>elogind</command></phrase>
|
---|
105 | <phrase revision="systemd"><command>systemd-logind</command></phrase>
|
---|
106 | can track <application>Polkit</application> sessions.
|
---|
107 | </para>
|
---|
108 | </note>
|
---|
109 |
|
---|
110 |
|
---|
111 | <bridgehead renderas="sect4">Optional (Required if building GNOME)</bridgehead>
|
---|
112 | <para role="optional">
|
---|
113 | <xref linkend="gobject-introspection"/>
|
---|
114 | </para>
|
---|
115 |
|
---|
116 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
117 | <para role="optional">
|
---|
118 | <xref linkend="dbus-python"/> and
|
---|
119 | <xref linkend="python-dbusmock"/> (for tests),
|
---|
120 | <xref linkend="DocBook"/>,
|
---|
121 | <xref linkend="docbook-xsl"/>,
|
---|
122 | <xref linkend="gtk-doc"/>, and
|
---|
123 | <xref linkend="libxslt"/>
|
---|
124 | </para>
|
---|
125 |
|
---|
126 | <bridgehead renderas="sect4" revision="systemd">Required Runtime Dependencies</bridgehead>
|
---|
127 | <para role="required" revision="systemd">
|
---|
128 | <xref role="runtime" linkend="systemd"/>
|
---|
129 | </para>
|
---|
130 |
|
---|
131 | <bridgehead renderas="sect4" id="polkit-agent" xreflabel="Polkit Authentication Agent">
|
---|
132 | Optional Runtime Dependencies
|
---|
133 | </bridgehead>
|
---|
134 | <para role="optional">
|
---|
135 | One polkit authentication agent for using polkit in the graphical
|
---|
136 | environment:
|
---|
137 | <application>polkit-kde-agent</application> in
|
---|
138 | <xref role="runtime" linkend="plasma5-build"/> for KDE,
|
---|
139 | the agent built in
|
---|
140 | <xref role="runtime" linkend="gnome-shell"/> for GNOME3,
|
---|
141 | <xref role="runtime" linkend="polkit-gnome"/> for XFCE, and
|
---|
142 | <application>lxpolkit</application> in
|
---|
143 | <xref role="runtime" linkend="lxsession"/> for LXDE.
|
---|
144 | </para>
|
---|
145 |
|
---|
146 | <note>
|
---|
147 | <para>
|
---|
148 | If <xref linkend="libxslt"/> is installed,
|
---|
149 | then <xref linkend="DocBook"/> and <xref linkend="docbook-xsl"/> are
|
---|
150 | required. If you have installed <xref linkend="libxslt"/>, but you do
|
---|
151 | not want to install any of the DocBook packages mentioned, you will
|
---|
152 | need to use <option>--disable-man-pages</option> in the instructions
|
---|
153 | below.
|
---|
154 | </para>
|
---|
155 | </note>
|
---|
156 |
|
---|
157 | <para condition="html" role="usernotes">User Notes:
|
---|
158 | <ulink url="&blfs-wiki;/polkit"/>
|
---|
159 | </para>
|
---|
160 | </sect2>
|
---|
161 |
|
---|
162 | <sect2 role="installation">
|
---|
163 | <title>Installation of Polkit</title>
|
---|
164 |
|
---|
165 | <para>
|
---|
166 | There should be a dedicated user and group to take control
|
---|
167 | of the <command>polkitd</command> daemon after it is
|
---|
168 | started. Issue the following commands as the
|
---|
169 | <systemitem class="username">root</systemitem> user:
|
---|
170 | </para>
|
---|
171 |
|
---|
172 | <screen role="root"><userinput>groupadd -fg 27 polkitd &&
|
---|
173 | useradd -c "PolicyKit Daemon Owner" -d /etc/polkit-1 -u 27 \
|
---|
174 | -g polkitd -s /bin/false polkitd</userinput></screen>
|
---|
175 |
|
---|
176 | <note revision="systemd">
|
---|
177 | <para>
|
---|
178 | When building <application>Polkit</application> with
|
---|
179 | <application>systemd</application> logind support, the
|
---|
180 | <command>configure</command> script explicitly checks if
|
---|
181 | system is booted using <application>systemd</application>.
|
---|
182 | This can cause problems if building the package in chroot,
|
---|
183 | where the <command>configure</command> would fail to
|
---|
184 | detect <application>systemd</application>. To workaround
|
---|
185 | the problem, simply run the following command:
|
---|
186 | </para>
|
---|
187 |
|
---|
188 | <screen><userinput>sed -i "s:/sys/fs/cgroup/systemd/:/sys:g" configure</userinput></screen>
|
---|
189 | </note>
|
---|
190 |
|
---|
191 | <para>
|
---|
192 | Install <application>Polkit</application> by running the following
|
---|
193 | commands:
|
---|
194 | </para>
|
---|
195 |
|
---|
196 | <screen revision="systemd"><userinput>./configure --prefix=/usr \
|
---|
197 | --sysconfdir=/etc \
|
---|
198 | --localstatedir=/var \
|
---|
199 | --disable-static \
|
---|
200 | --with-os-type=LFS &&
|
---|
201 | make</userinput></screen>
|
---|
202 |
|
---|
203 | <screen revision="sysv"><userinput>./configure --prefix=/usr \
|
---|
204 | --sysconfdir=/etc \
|
---|
205 | --localstatedir=/var \
|
---|
206 | --disable-static \
|
---|
207 | --with-os-type=LFS \
|
---|
208 | --enable-libsystemd-login=no &&
|
---|
209 | make</userinput></screen>
|
---|
210 |
|
---|
211 | <para>
|
---|
212 | To test the results, first ensure that the system
|
---|
213 | <application>D-Bus</application> daemon is running and
|
---|
214 | restore a missing file. Then run the tests:
|
---|
215 | </para>
|
---|
216 |
|
---|
217 | <screen remap="test"><userinput>cp ../polkitbackendjsauthoritytest-wrapper.py test/polkitbackend/ &&
|
---|
218 | chmod 755 test/polkitbackend/polkitbackendjsauthoritytest-wrapper.py &&
|
---|
219 | make check</userinput></screen>
|
---|
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 > /etc/pam.d/polkit-1 << "EOF"
|
---|
275 | <literal># Begin /etc/pam.d/polkit-1
|
---|
276 |
|
---|
277 | auth include system-auth
|
---|
278 | account include system-account
|
---|
279 | password include system-password
|
---|
280 | session include system-session
|
---|
281 |
|
---|
282 | # End /etc/pam.d/polkit-1</literal>
|
---|
283 | EOF</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>
|
---|