Introduction to Polkit
Polkit is a toolkit for defining
and handling authorizations. It is used for allowing unprivileged
processes to communicate with privileged processes.
This package is known to build and work properly using an LFS-8.0
Due to lack of relases, a tarball has been generated for use by
BLFS, which includes a git checkout at ref 2919920, and a pending
patch to use js38. The patch is included in the tarball for
GLib-2.52.1, and js38-38.2.1
Since systemd-logind uses PAM to
register user sessions, it is a good idea to build Polkit with PAM support so systemd-logind can track
Optional (Required if building GNOME)
docbook-xml-4.5, docbook-xsl-1.79.1, GTK-Doc-1.25,
Required Runtime Dependencies
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/polkit
Installation of Polkit
There should be a dedicated user and group to take control of the
polkitd daemon after
it is started. Issue the following commands as the
groupadd -fg 27 polkitd &&
useradd -c "PolicyKit Daemon Owner" -d /etc/polkit-1 -u 27 \
-g polkitd -s /bin/false polkitd
When building Polkit with
systemd logind support, the
explicitly checks if system is booted using systemd. This can cause problems if building
the package in chroot, where the configure would fail to detect
systemd. To workaround the
problem, simply run the following command:
sed -i "s:/sys/fs/cgroup/systemd/:/sys:g" configure
Install Polkit by running the
./configure --prefix=/usr \
To test the results, issue: make
check. Note that system D-Bus daemon must be running for the testsuite
to complete. There is also a warning about ConsoleKit database not present, but that one
can be safely ignored.
Now, as the
--with-authfw=shadow: This switch
enables the package to use the Shadow rather than the Linux PAM Authentication framework. Use it if
you have not installed Linux PAM.
switch prevents installation of static versions of the libraries.
--enable-gtk-doc: Use this parameter if
GTK-Doc is installed and you wish
to rebuild and install the API documentation.
If you did not build Polkit
with Linux PAM support, you
can skip this section.
If you have built Polkit with
Linux PAM support, you need to
modify the default PAM configuration file which was installed by
default to get Polkit to work
correctly with BLFS. Issue the following commands as the
root user to create the
configuration file for Linux
cat > /etc/pam.d/polkit-1 << "EOF"
# Begin /etc/pam.d/polkit-1
auth include system-auth
account include system-account
password include system-password
session include system-session
# End /etc/pam.d/polkit-1
pkaction, pkcheck, pk-example-frobnicate,
pkexec, pkttyagent and polkitd
/usr/lib/polkit-1, /usr/share/gtk-doc/html/polkit-1 and
is used to obtain information about registered PolicyKit
is used to check whether a process is authorized for
is an example program to test the pkexec command.
allows an authorized user to execute a command as another
is used to start a textual authentication agent for the
provides the org.freedesktop.PolicyKit1 D-Bus service on the system message
contains the Polkit
authentication agent API functions.
contains the Polkit
authorization API functions.
Last updated on 2017-04-06 00:34:37 -0500