source: postlfs/security/polkit.xml@ 9621162

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.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 9621162 was 0d6ad48, checked in by Bruce Dubbs <bdubbs@…>, 4 years ago

Update to polkit-32450615.

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

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