source: postlfs/security/polkit.xml@ 51dfb3e

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 51dfb3e was 51dfb3e, checked in by Bruce Dubbs <bdubbs@…>, 5 years ago

Move BLFS/trunk/BOOK and BLFS/trunk/bootscripts to
BLFS/branches/old-trunk-20190627 and BLFS/branches/old-bootscripts-20190627.

Move BLFS/branches/elogind-book and BLFS/branches/elogind-bootscripts
to trunk.

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

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