source: postlfs/security/polkit.xml@ 45ab6c7

trunk
Last change on this file since 45ab6c7 was 45ab6c7, checked in by Xi Ruoyao <xry111@…>, 3 months ago

more SVN prop clean up

Remove "$LastChanged$" everywhere, and also some unused $Date$

  • Property mode set to 100644
File size: 13.8 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 "https://www.freedesktop.org/software/polkit/releases/polkit-&polkit-version;.tar.gz">
8 <!ENTITY polkit-download-ftp " ">
9 <!ENTITY polkit-md5sum "ae3f2a742740069922589ad20ffd54d2">
10 <!ENTITY polkit-size "1.5 MB">
11 <!ENTITY polkit-buildsize "17 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 <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 &lfs101_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 <bridgehead renderas="sect3"
74 revision="sysv">Additional Downloads</bridgehead>
75 <itemizedlist spacing="compact" revision="sysv">
76 <listitem>
77 <para>
78 Recommended patch:
79 <ulink url="&patch-root;/polkit-&polkit-version;-fix_elogind_detection-1.patch"/>
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="js78"/>
90 </para>
91
92 <bridgehead renderas="sect4">Recommended</bridgehead>
93 <para role="recommended">
94 <xref linkend="linux-pam"/>
95 <phrase revision="sysv">and <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 &amp;&amp;
173useradd -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 revision="sysv">
192 Fix an issue introduced in recent <application>Polkit</application>
193 releases with elogind:
194 </para>
195
196<screen revision="sysv"><userinput>patch -Np1 -i ../polkit-&polkit-version;-fix_elogind_detection-1.patch &amp;&amp;
197autoreconf -fv</userinput></screen>
198
199 <para>
200 Install <application>Polkit</application> by running the following
201 commands:
202 </para>
203
204<screen revision="systemd"><userinput>./configure --prefix=/usr \
205 --sysconfdir=/etc \
206 --localstatedir=/var \
207 --disable-static \
208 --with-os-type=LFS &amp;&amp;
209make</userinput></screen>
210
211<screen revision="sysv"><userinput>./configure --prefix=/usr \
212 --sysconfdir=/etc \
213 --localstatedir=/var \
214 --disable-static \
215 --with-os-type=LFS \
216 --disable-libsystemd-login &amp;&amp;
217make</userinput></screen>
218
219 <para>
220 To test the results, first ensure that the system
221 <application>D-Bus</application> daemon is running.
222 Then run <command>make check</command>.
223 </para>
224
225 <para>
226 Now, as the <systemitem class="username">root</systemitem> user:
227 </para>
228
229<screen role="root"><userinput>make install</userinput></screen>
230
231 </sect2>
232
233 <sect2 role="commands">
234 <title>Command Explanations</title>
235
236 <para revision="sysv">
237 <parameter>--disable-libsystemd-login</parameter>: This switch forces
238 polkit to build with elogind support (if available) rather than
239 systemd-logind.
240 </para>
241
242 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
243 href="../../xincludes/static-libraries.xml"/>
244
245 <para>
246 <option>--with-authfw=shadow</option>: This switch enables the
247 package to use the <application>Shadow</application> rather than the
248 <application>Linux PAM</application> Authentication framework. Use it
249 if you have not installed <application>Linux PAM</application>.
250 </para>
251
252 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
253 href="../../xincludes/gtk-doc-rebuild.xml"/>
254
255 </sect2>
256
257 <sect2 role="configuration">
258 <title>Configuring Polkit</title>
259
260 <sect3>
261 <title>PAM Configuration</title>
262
263 <note>
264 <para>
265 If you did not build <application>Polkit</application> with
266 <application>Linux PAM</application> support, you can skip this
267 section.
268 </para>
269 </note>
270
271 <para>
272 If you have built <application>Polkit</application> with
273 <application>Linux PAM</application> support, you need to modify
274 the default PAM configuration file which was installed by default to get
275 <application>Polkit</application> to work correctly with BLFS. Issue the
276 following commands as the <systemitem class="username">root</systemitem>
277 user to create the configuration file for <application>Linux PAM</application>:
278 </para>
279
280<screen role="root"><userinput>cat &gt; /etc/pam.d/polkit-1 &lt;&lt; "EOF"
281<literal># Begin /etc/pam.d/polkit-1
282
283auth include system-auth
284account include system-account
285password include system-password
286session include system-session
287
288# End /etc/pam.d/polkit-1</literal>
289EOF</userinput></screen>
290
291 </sect3>
292
293 </sect2>
294
295 <sect2 role="content">
296 <title>Contents</title>
297
298 <segmentedlist>
299 <segtitle>Installed Programs</segtitle>
300 <segtitle>Installed Libraries</segtitle>
301 <segtitle>Installed Directories</segtitle>
302
303 <seglistitem>
304 <seg>
305 pkaction, pkcheck, pk-example-frobnicate, pkexec,
306 pkttyagent and polkitd
307 </seg>
308 <seg>
309 libpolkit-agent-1.so and
310 libpolkit-gobject-1.so
311 </seg>
312 <seg>
313 /etc/polkit-1,
314 /usr/include/polkit-1,
315 /usr/lib/polkit-1,
316 /usr/share/gtk-doc/html/polkit-1 and
317 /usr/share/polkit-1
318 </seg>
319 </seglistitem>
320 </segmentedlist>
321
322 <variablelist>
323 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
324 <?dbfo list-presentation="list"?>
325 <?dbhtml list-presentation="table"?>
326
327 <varlistentry id="pkaction">
328 <term><command>pkaction</command></term>
329 <listitem>
330 <para>
331 is used to obtain information about registered PolicyKit actions
332 </para>
333 <indexterm zone="polkit pkaction">
334 <primary sortas="b-pkaction">pkaction</primary>
335 </indexterm>
336 </listitem>
337 </varlistentry>
338
339 <varlistentry id="pkcheck">
340 <term><command>pkcheck</command></term>
341 <listitem>
342 <para>
343 is used to check whether a process is authorized for action
344 </para>
345 <indexterm zone="polkit pkcheck">
346 <primary sortas="b-pkcheck">pkcheck</primary>
347 </indexterm>
348 </listitem>
349 </varlistentry>
350
351 <varlistentry id="pk-example-frobnicate">
352 <term><command>pk-example-frobnicate</command></term>
353 <listitem>
354 <para>
355 is an example program to test the <command>pkexec</command>
356 command
357 </para>
358 <indexterm zone="polkit pk-example-frobnicate">
359 <primary sortas="b-pk-example-frobnicate">pk-example-frobnicate</primary>
360 </indexterm>
361 </listitem>
362 </varlistentry>
363
364 <varlistentry id="pkexec">
365 <term><command>pkexec</command></term>
366 <listitem>
367 <para>
368 allows an authorized user to execute a command as another user
369 </para>
370 <indexterm zone="polkit pkexec">
371 <primary sortas="b-pkexec">pkexec</primary>
372 </indexterm>
373 </listitem>
374 </varlistentry>
375
376 <varlistentry id="pkttyagent">
377 <term><command>pkttyagent</command></term>
378 <listitem>
379 <para>
380 is used to start a textual authentication agent for the subject
381 </para>
382 <indexterm zone="polkit pkttyagent">
383 <primary sortas="b-pkttyagent">pkttyagent</primary>
384 </indexterm>
385 </listitem>
386 </varlistentry>
387
388 <varlistentry id="polkitd">
389 <term><command>polkitd</command></term>
390 <listitem>
391 <para>
392 provides the org.freedesktop.PolicyKit1 <application>D-Bus</application>
393 service on the system message bus
394 </para>
395 <indexterm zone="polkit polkitd">
396 <primary sortas="b-polkitd">polkitd</primary>
397 </indexterm>
398 </listitem>
399 </varlistentry>
400
401 <varlistentry id="libpolkit-agent-1">
402 <term><filename class="libraryfile">libpolkit-agent-1.so</filename></term>
403 <listitem>
404 <para>
405 contains the <application>Polkit</application> authentication
406 agent API functions
407 </para>
408 <indexterm zone="polkit libpolkit-agent-1">
409 <primary sortas="c-libpolkit-agent-1">libpolkit-agent-1.so</primary>
410 </indexterm>
411 </listitem>
412 </varlistentry>
413
414 <varlistentry id="libpolkit-gobject-1">
415 <term><filename class="libraryfile">libpolkit-gobject-1.so</filename></term>
416 <listitem>
417 <para>
418 contains the <application>Polkit</application> authorization API functions
419 </para>
420 <indexterm zone="polkit libpolkit-gobject-1">
421 <primary sortas="c-libpolkit-gobject-1">libpolkit-gobject-1.so</primary>
422 </indexterm>
423 </listitem>
424 </varlistentry>
425
426 </variablelist>
427
428 </sect2>
429
430</sect1>
Note: See TracBrowser for help on using the repository browser.