source: postlfs/security/polkit.xml@ 3706c7fe

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 9.0 9.1 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt 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 3706c7fe was 9da30c5, checked in by Douglas R. Reno <renodr@…>, 5 years ago

systemd: Remove unneccesary carriage return in polkit

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

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