source: postlfs/security/polkit.xml@ 9a8e5d2

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

Initial commit of elogind-239.3. Adjust serveral packages to utilize elogind.

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

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