source: postlfs/security/polkit.xml@ 7cb4635

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 7cb4635 was 7cb4635, checked in by Pierre Labastie <pierre.labastie@…>, 3 years ago

Recommend a build order for elogind<->polkit circular dep

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