source: postlfs/security/polkit.xml@ 4b1b99e8

elogind
Last change on this file since 4b1b99e8 was 4b1b99e8, checked in by DJ Lucas <dj@…>, 5 years ago

Merge to HEAD 21160.

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

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