source: postlfs/security/polkit.xml@ d653420

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 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 d653420 was d653420, checked in by Pierre Labastie <pieere@…>, 6 years ago

Add --enable-libelogind=no to
Polkit in Sys V book

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