1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
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://gitlab.freedesktop.org/polkit/polkit/-/archive/&polkit-version;/polkit-&polkit-version;.tar.gz">
|
---|
8 | <!ENTITY polkit-download-ftp " ">
|
---|
9 | <!ENTITY polkit-md5sum "97db655618e1483706fbc764787c7d6e">
|
---|
10 | <!ENTITY polkit-size "744 KB">
|
---|
11 | <!ENTITY polkit-buildsize "7.2 MB (with tests)">
|
---|
12 | <!ENTITY polkit-time "0.3 SBU (with tests; using parallelism=4)">
|
---|
13 | ]>
|
---|
14 |
|
---|
15 | <sect1 id="polkit" xreflabel="Polkit-&polkit-version;">
|
---|
16 | <?dbhtml filename="polkit.html"?>
|
---|
17 |
|
---|
18 |
|
---|
19 | <title>Polkit-&polkit-version;</title>
|
---|
20 |
|
---|
21 | <indexterm zone="polkit">
|
---|
22 | <primary sortas="a-Polkit">Polkit</primary>
|
---|
23 | </indexterm>
|
---|
24 |
|
---|
25 | <sect2 role="package">
|
---|
26 | <title>Introduction to Polkit</title>
|
---|
27 |
|
---|
28 | <para>
|
---|
29 | <application>Polkit</application> is a toolkit for defining and handling
|
---|
30 | authorizations. It is used for allowing unprivileged processes to
|
---|
31 | communicate with privileged processes.
|
---|
32 | </para>
|
---|
33 |
|
---|
34 | &lfs120_checked;
|
---|
35 |
|
---|
36 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
37 | <itemizedlist spacing="compact">
|
---|
38 | <listitem>
|
---|
39 | <para>
|
---|
40 | Download (HTTP): <ulink url="&polkit-download-http;"/>
|
---|
41 | </para>
|
---|
42 | </listitem>
|
---|
43 | <listitem>
|
---|
44 | <para>
|
---|
45 | Download (FTP): <ulink url="&polkit-download-ftp;"/>
|
---|
46 | </para>
|
---|
47 | </listitem>
|
---|
48 | <listitem>
|
---|
49 | <para>
|
---|
50 | Download MD5 sum: &polkit-md5sum;
|
---|
51 | </para>
|
---|
52 | </listitem>
|
---|
53 | <listitem>
|
---|
54 | <para>
|
---|
55 | Download size: &polkit-size;
|
---|
56 | </para>
|
---|
57 | </listitem>
|
---|
58 | <listitem>
|
---|
59 | <para>
|
---|
60 | Estimated disk space required: &polkit-buildsize;
|
---|
61 | </para>
|
---|
62 | </listitem>
|
---|
63 | <listitem>
|
---|
64 | <para>
|
---|
65 | Estimated build time: &polkit-time;
|
---|
66 | </para>
|
---|
67 | </listitem>
|
---|
68 | </itemizedlist>
|
---|
69 |
|
---|
70 | <!--
|
---|
71 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
72 | <itemizedlist spacing="compact">
|
---|
73 | <listitem>
|
---|
74 | <para>
|
---|
75 | Required patch:
|
---|
76 | <ulink url="&patch-root;/polkit-&polkit-version;-security_fixes-1.patch"/>
|
---|
77 | </para>
|
---|
78 | </listitem>
|
---|
79 | <listitem>
|
---|
80 | <para>
|
---|
81 | Required patch:
|
---|
82 | <ulink url="&patch-root;/polkit-&polkit-version;-js91-1.patch"/>
|
---|
83 | </para>
|
---|
84 | </listitem>
|
---|
85 | </itemizedlist>
|
---|
86 | -->
|
---|
87 |
|
---|
88 | <bridgehead renderas="sect3">Polkit Dependencies</bridgehead>
|
---|
89 |
|
---|
90 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
91 | <para role="required">
|
---|
92 | <xref linkend="glib2"/>
|
---|
93 | </para>
|
---|
94 |
|
---|
95 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
96 | <para role="recommended">
|
---|
97 | <!-- For jhalfs just make it required to avoid over-complexity. -->
|
---|
98 | <xref role="required" linkend="duktape"/>,
|
---|
99 | <xref linkend="gobject-introspection"/>,
|
---|
100 | <xref linkend="libxslt"/>,<phrase revision="systemd"> and</phrase>
|
---|
101 | <xref linkend="linux-pam"/><phrase revision="sysv">, and
|
---|
102 | <xref linkend="elogind"/>
|
---|
103 | </phrase>
|
---|
104 | </para>
|
---|
105 |
|
---|
106 | <note>
|
---|
107 | <para>
|
---|
108 | Since <phrase revision="sysv"><command>elogind</command></phrase>
|
---|
109 | <phrase revision="systemd"><command>systemd-logind</command></phrase>
|
---|
110 | uses PAM to register user sessions, it is a good idea to build
|
---|
111 | <application>Polkit</application> with PAM support so
|
---|
112 | <phrase revision="sysv"><command>elogind</command></phrase>
|
---|
113 | <phrase revision="systemd"><command>systemd-logind</command></phrase>
|
---|
114 | can track <application>Polkit</application> sessions.
|
---|
115 | </para>
|
---|
116 | </note>
|
---|
117 |
|
---|
118 |
|
---|
119 | <!-- Due to the fact that meson will not autodetect g-i and
|
---|
120 | has it set to required unless you pass an option, and the likelihood
|
---|
121 | of users ignoring a command explanation and then sending in mails
|
---|
122 | regarding KDE or GNOME not working after installing polkit, let's move
|
---|
123 | it to recommended. See #15640 for logic
|
---|
124 | <bridgehead renderas="sect4">Optional (Required if building GNOME)</bridgehead>
|
---|
125 | <para role="optional">
|
---|
126 | <xref linkend="gobject-introspection"/>
|
---|
127 | </para>
|
---|
128 | -->
|
---|
129 |
|
---|
130 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
131 | <para role="optional">
|
---|
132 | <xref linkend="gtk-doc"/>,
|
---|
133 | <xref linkend="python-dbusmock"/>, and
|
---|
134 | <xref linkend="spidermonkey"/> (can be used in place of duktape)
|
---|
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 | <xref role="runtime" linkend="lxqt-policykit"/> for LXQt
|
---|
154 | </para>
|
---|
155 |
|
---|
156 | <note>
|
---|
157 | <para>
|
---|
158 | If <xref linkend="libxslt"/> is installed,
|
---|
159 | then <xref linkend="DocBook"/> and <xref linkend="docbook-xsl"/> are
|
---|
160 | required. If you have installed <xref linkend="libxslt"/>, but you do
|
---|
161 | not want to install any of the DocBook packages mentioned, you will
|
---|
162 | need to use <option>-Dman=false</option> in the instructions
|
---|
163 | below.
|
---|
164 | </para>
|
---|
165 | </note>
|
---|
166 |
|
---|
167 | </sect2>
|
---|
168 |
|
---|
169 | <sect2 role="installation">
|
---|
170 | <title>Installation of Polkit</title>
|
---|
171 |
|
---|
172 | <para>
|
---|
173 | There should be a dedicated user and group to take control
|
---|
174 | of the <command>polkitd</command> daemon after it is
|
---|
175 | started. Issue the following commands as the
|
---|
176 | <systemitem class="username">root</systemitem> user:
|
---|
177 | </para>
|
---|
178 |
|
---|
179 | <screen role="root"><userinput>groupadd -fg 27 polkitd &&
|
---|
180 | useradd -c "PolicyKit Daemon Owner" -d /etc/polkit-1 -u 27 \
|
---|
181 | -g polkitd -s /bin/false polkitd</userinput></screen>
|
---|
182 |
|
---|
183 | <para revision='sysv'>
|
---|
184 | First fix a build problem for sysV based systems:
|
---|
185 | </para>
|
---|
186 |
|
---|
187 | <screen revision="sysv"><userinput>sed -i '/systemd_sysusers_dir/s/^/#/' meson.build</userinput></screen>
|
---|
188 |
|
---|
189 | <para>
|
---|
190 | Install <application>Polkit</application> by running the following
|
---|
191 | commands:
|
---|
192 | </para>
|
---|
193 |
|
---|
194 | <screen revision="systemd"><userinput>mkdir build &&
|
---|
195 | cd build &&
|
---|
196 |
|
---|
197 | meson setup .. \
|
---|
198 | --prefix=/usr \
|
---|
199 | --buildtype=release \
|
---|
200 | -Dman=true \
|
---|
201 | -Dsession_tracking=libsystemd-login \
|
---|
202 | -Dtests=true &&
|
---|
203 | ninja</userinput></screen>
|
---|
204 |
|
---|
205 | <screen revision="sysv"><userinput>mkdir build &&
|
---|
206 | cd build &&
|
---|
207 |
|
---|
208 | meson setup .. \
|
---|
209 | --prefix=/usr \
|
---|
210 | --buildtype=release \
|
---|
211 | -Dman=true \
|
---|
212 | -Dsession_tracking=libelogind \
|
---|
213 | -Dtests=true &&
|
---|
214 | ninja</userinput></screen>
|
---|
215 |
|
---|
216 | <para>
|
---|
217 | To test the results, first ensure that the system
|
---|
218 | <application>D-Bus</application> daemon is running,
|
---|
219 | and both <xref linkend='dbus-python'/> and
|
---|
220 | <xref linkend='python-dbusmock'/> are installed.
|
---|
221 | Then run <command>ninja test</command>.
|
---|
222 | </para>
|
---|
223 |
|
---|
224 | <para>
|
---|
225 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
226 | </para>
|
---|
227 |
|
---|
228 | <screen role="root"><userinput>ninja install</userinput></screen>
|
---|
229 |
|
---|
230 | </sect2>
|
---|
231 |
|
---|
232 | <sect2 role="commands">
|
---|
233 | <title>Command Explanations</title>
|
---|
234 |
|
---|
235 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
236 | href="../../xincludes/meson-buildtype-release.xml"/>
|
---|
237 |
|
---|
238 | <para>
|
---|
239 | <parameter>-Dtests=true</parameter>: This switch allows to run the
|
---|
240 | test suite of this package. As <application>Polkit</application> is
|
---|
241 | used for authorizations, its integrity can affect system security.
|
---|
242 | So it's recommended to run the test suite building this package.
|
---|
243 | </para>
|
---|
244 |
|
---|
245 | <para>
|
---|
246 | <option>-Djs_engine=mozjs</option>: This switch allows using the
|
---|
247 | <xref linkend="spidermonkey"/> JavaScript engine instead of the
|
---|
248 | <xref linkend='duktape'/> JavaScript engine.
|
---|
249 | </para>
|
---|
250 |
|
---|
251 | <!--
|
---|
252 | <para revision="sysv">
|
---|
253 | <parameter>- -disable-libsystemd-login</parameter>: This switch forces
|
---|
254 | polkit to build with elogind support (if available) rather than
|
---|
255 | systemd-logind.
|
---|
256 | </para>
|
---|
257 |
|
---|
258 |
|
---|
259 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
260 | href="../../xincludes/static-libraries.xml"/>
|
---|
261 | -->
|
---|
262 |
|
---|
263 | <para>
|
---|
264 | <option>-Dos_type=lfs</option>: Use this switch if you did not create
|
---|
265 | the <filename>/etc/lfs-release</filename> file or distribution auto
|
---|
266 | detection will fail and you will be unable to use
|
---|
267 | <application>Polkit</application>.
|
---|
268 | </para>
|
---|
269 |
|
---|
270 | <para>
|
---|
271 | <option>-Dauthfw=shadow</option>: This switch enables the
|
---|
272 | package to use the <application>Shadow</application> rather than the
|
---|
273 | <application>Linux PAM</application> Authentication framework. Use it
|
---|
274 | if you have not installed <application>Linux PAM</application>.
|
---|
275 | </para>
|
---|
276 |
|
---|
277 | <!--
|
---|
278 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
279 | href="../../xincludes/gtk-doc-rebuild.xml"/>
|
---|
280 | -->
|
---|
281 |
|
---|
282 | <para>
|
---|
283 | <option>-Dintrospection=false</option>: Use this option if you are certain
|
---|
284 | that you do not need gobject-introspection files for polkit, or do not have
|
---|
285 | gobject-introspection installed.
|
---|
286 | </para>
|
---|
287 |
|
---|
288 | <para>
|
---|
289 | <option>-Dman=false</option>: Use this option to disable generating and
|
---|
290 | installing manual pages. This is useful if libxslt is not installed.
|
---|
291 | </para>
|
---|
292 |
|
---|
293 | <para>
|
---|
294 | <option>-Dexamples=true</option>: Use this option to build the example
|
---|
295 | programs.
|
---|
296 | </para>
|
---|
297 |
|
---|
298 | <para>
|
---|
299 | <option>-Dgtk_doc=true</option>: Use this option to enable building and
|
---|
300 | installing the API documentation.
|
---|
301 | </para>
|
---|
302 |
|
---|
303 | </sect2>
|
---|
304 |
|
---|
305 | <sect2 role="content">
|
---|
306 | <title>Contents</title>
|
---|
307 |
|
---|
308 | <segmentedlist>
|
---|
309 | <segtitle>Installed Programs</segtitle>
|
---|
310 | <segtitle>Installed Libraries</segtitle>
|
---|
311 | <segtitle>Installed Directories</segtitle>
|
---|
312 |
|
---|
313 | <seglistitem>
|
---|
314 | <seg>
|
---|
315 | pkaction, pkcheck, <!--pk-example-frobnicate,--> pkexec,
|
---|
316 | pkttyagent, and polkitd
|
---|
317 | </seg>
|
---|
318 | <seg>
|
---|
319 | libpolkit-agent-1.so and
|
---|
320 | libpolkit-gobject-1.so
|
---|
321 | </seg>
|
---|
322 | <seg>
|
---|
323 | /etc/polkit-1,
|
---|
324 | /usr/include/polkit-1,
|
---|
325 | /usr/lib/polkit-1,
|
---|
326 | /usr/share/gtk-doc/html/polkit-1, and
|
---|
327 | /usr/share/polkit-1
|
---|
328 | </seg>
|
---|
329 | </seglistitem>
|
---|
330 | </segmentedlist>
|
---|
331 |
|
---|
332 | <variablelist>
|
---|
333 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
334 | <?dbfo list-presentation="list"?>
|
---|
335 | <?dbhtml list-presentation="table"?>
|
---|
336 |
|
---|
337 | <varlistentry id="pkaction">
|
---|
338 | <term><command>pkaction</command></term>
|
---|
339 | <listitem>
|
---|
340 | <para>
|
---|
341 | is used to obtain information about registered PolicyKit actions
|
---|
342 | </para>
|
---|
343 | <indexterm zone="polkit pkaction">
|
---|
344 | <primary sortas="b-pkaction">pkaction</primary>
|
---|
345 | </indexterm>
|
---|
346 | </listitem>
|
---|
347 | </varlistentry>
|
---|
348 |
|
---|
349 | <varlistentry id="pkcheck">
|
---|
350 | <term><command>pkcheck</command></term>
|
---|
351 | <listitem>
|
---|
352 | <para>
|
---|
353 | is used to check whether a process is authorized for action
|
---|
354 | </para>
|
---|
355 | <indexterm zone="polkit pkcheck">
|
---|
356 | <primary sortas="b-pkcheck">pkcheck</primary>
|
---|
357 | </indexterm>
|
---|
358 | </listitem>
|
---|
359 | </varlistentry>
|
---|
360 |
|
---|
361 | <!--
|
---|
362 | <varlistentry id="pk-example-frobnicate">
|
---|
363 | <term><command>pk-example-frobnicate</command></term>
|
---|
364 | <listitem>
|
---|
365 | <para>
|
---|
366 | is an example program to test the <command>pkexec</command>
|
---|
367 | command
|
---|
368 | </para>
|
---|
369 | <indexterm zone="polkit pk-example-frobnicate">
|
---|
370 | <primary sortas="b-pk-example-frobnicate">pk-example-frobnicate</primary>
|
---|
371 | </indexterm>
|
---|
372 | </listitem>
|
---|
373 | </varlistentry>
|
---|
374 | -->
|
---|
375 |
|
---|
376 | <varlistentry id="pkexec">
|
---|
377 | <term><command>pkexec</command></term>
|
---|
378 | <listitem>
|
---|
379 | <para>
|
---|
380 | allows an authorized user to execute a command as another user
|
---|
381 | </para>
|
---|
382 | <indexterm zone="polkit pkexec">
|
---|
383 | <primary sortas="b-pkexec">pkexec</primary>
|
---|
384 | </indexterm>
|
---|
385 | </listitem>
|
---|
386 | </varlistentry>
|
---|
387 |
|
---|
388 | <varlistentry id="pkttyagent">
|
---|
389 | <term><command>pkttyagent</command></term>
|
---|
390 | <listitem>
|
---|
391 | <para>
|
---|
392 | is used to start a textual authentication agent for the subject
|
---|
393 | </para>
|
---|
394 | <indexterm zone="polkit pkttyagent">
|
---|
395 | <primary sortas="b-pkttyagent">pkttyagent</primary>
|
---|
396 | </indexterm>
|
---|
397 | </listitem>
|
---|
398 | </varlistentry>
|
---|
399 |
|
---|
400 | <varlistentry id="polkitd">
|
---|
401 | <term><command>polkitd</command></term>
|
---|
402 | <listitem>
|
---|
403 | <para>
|
---|
404 | provides the org.freedesktop.PolicyKit1 <application>D-Bus</application>
|
---|
405 | service on the system message bus
|
---|
406 | </para>
|
---|
407 | <indexterm zone="polkit polkitd">
|
---|
408 | <primary sortas="b-polkitd">polkitd</primary>
|
---|
409 | </indexterm>
|
---|
410 | </listitem>
|
---|
411 | </varlistentry>
|
---|
412 |
|
---|
413 | <varlistentry id="libpolkit-agent-1">
|
---|
414 | <term><filename class="libraryfile">libpolkit-agent-1.so</filename></term>
|
---|
415 | <listitem>
|
---|
416 | <para>
|
---|
417 | contains the <application>Polkit</application> authentication
|
---|
418 | agent API functions
|
---|
419 | </para>
|
---|
420 | <indexterm zone="polkit libpolkit-agent-1">
|
---|
421 | <primary sortas="c-libpolkit-agent-1">libpolkit-agent-1.so</primary>
|
---|
422 | </indexterm>
|
---|
423 | </listitem>
|
---|
424 | </varlistentry>
|
---|
425 |
|
---|
426 | <varlistentry id="libpolkit-gobject-1">
|
---|
427 | <term><filename class="libraryfile">libpolkit-gobject-1.so</filename></term>
|
---|
428 | <listitem>
|
---|
429 | <para>
|
---|
430 | contains the <application>Polkit</application> authorization API functions
|
---|
431 | </para>
|
---|
432 | <indexterm zone="polkit libpolkit-gobject-1">
|
---|
433 | <primary sortas="c-libpolkit-gobject-1">libpolkit-gobject-1.so</primary>
|
---|
434 | </indexterm>
|
---|
435 | </listitem>
|
---|
436 | </varlistentry>
|
---|
437 |
|
---|
438 | </variablelist>
|
---|
439 |
|
---|
440 | </sect2>
|
---|
441 |
|
---|
442 | </sect1>
|
---|