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