The ConsoleKit package is a framework for keeping track of the various users, sessions, and seats present on a system. It provides a mechanism for software to react to changes of any of these items or of any of the metadata associated with them.
This package is known to build and work properly using an LFS-7.5 platform.
Download (HTTP): http://anduin.linuxfromscratch.org/sources/BLFS/svn/c/ConsoleKit-0.4.6.tar.xz
Download MD5 sum: 6aaadf5627d2f7587aa116727e2fc1da
Download size: 356 KB
Estimated disk space required: 8.0 MB
Estimated build time: 0.3 SBU
acl-2.2.52, dbus-glib-0.102 and Xorg Libraries
Linux-PAM-1.1.8 and Polkit-0.112
If you intend NOT to install polkit, you will need to manually edit the ConsoleKit.conf file to lock down the service. Failure to do so may be a huge SECURITY HOLE.
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/consolekit
Install ConsoleKit by running the following commands:
./configure --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var \ --enable-udev-acl \ --enable-pam-module && make
This package does not come with a test suite.
Now, as the root
user:
make install
--enable-udev-acl
: This switch enables
building of the udev-acl tool, which is used to
allow normal users to access device nodes normally only accessible
to root
.
--enable-pam-module
: This switch
enables building of the ConsoleKit
PAM module which is needed for
ConsoleKit to work correctly with
PAM. Remove if Linux PAM is NOT installed.
--enable-docbook-docs
: Use this switch
if xmlto is installed and you wish
to build the API documentation.
--libexecdir=/usr/lib/ConsoleKit
: This
option creates a ConsoleKit
directory
in /usr/lib
instead of putting the
program's private executables into /usr/libexec
in accordance with the old version
of the FHS used before LFS-7.5.
If you use Linux PAM you need to
configure Linux PAM to activate
ConsoleKit upon user login. This
can be achieved by editing the /etc/pam.d/system-session
file as the
root
user:
cat >> /etc/pam.d/system-session << "EOF" # Begin ConsoleKit addition session optional pam_loginuid.so session optional pam_ck_connector.so nox11 # End ConsoleKit addition EOF
You will also need a helper script that creates a file in
/var/run/console
named as the
currently logged in user and that contains the D-Bus address of the session. You can create
the script by running the following commands as the root
user:
cat > /usr/lib/ConsoleKit/run-session.d/pam-foreground-compat.ck << "EOF" #!/bin/sh TAGDIR=/var/run/console [ -n "$CK_SESSION_USER_UID" ] || exit 1 [ "$CK_SESSION_IS_LOCAL" = "true" ] || exit 0 TAGFILE="$TAGDIR/`getent passwd $CK_SESSION_USER_UID | cut -f 1 -d:`" if [ "$1" = "session_added" ]; then mkdir -p "$TAGDIR" echo "$CK_SESSION_ID" >> "$TAGFILE" fi if [ "$1" = "session_removed" ] && [ -e "$TAGFILE" ]; then sed -i "\%^$CK_SESSION_ID\$%d" "$TAGFILE" [ -s "$TAGFILE" ] || rm -f "$TAGFILE" fi EOF chmod -v 755 /usr/lib/ConsoleKit/run-session.d/pam-foreground-compat.ck
See /usr/share/doc/ConsoleKit/spec/ConsoleKit.html for more configuration.
Last updated on 2014-03-03 19:06:31 -0800