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