source: postlfs/security/polkit.xml@ 8bd63687

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 8bd63687 was 8bd63687, checked in by DJ Lucas <dj@…>, 7 years ago

Update to polkit snapshot 2919920 with JS38 patch. Fixes #8431. Remove unneeded mozjs version 17 and 24.

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

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