source: postlfs/security/polkit.xml@ 2a21b602

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 2a21b602 was 2a21b602, checked in by Pierre Labastie <pieere@…>, 4 years ago

Polkit depends on mozjs-78 now

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

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