Index: postlfs/security/consolekit.xml
===================================================================
--- postlfs/security/consolekit.xml	(revision 4c2be43886361a629e4715d6d5119f642e462b27)
+++ postlfs/security/consolekit.xml	(revision be522520f36addfaa5c17209885ca6df9ef70e63)
@@ -5,9 +5,9 @@
   %general-entities;
 
-  <!ENTITY consolekit-download-http "http://www.freedesktop.org/software/ConsoleKit/dist/ConsoleKit-&consolekit-version;.tar.bz2">
+  <!ENTITY consolekit-download-http "http://www.linuxfromscratch.org/~krejzi/ConsoleKit-&consolekit-version;.tar.xz">
   <!ENTITY consolekit-download-ftp  " ">
-  <!ENTITY consolekit-md5sum        "f2657f93761206922d558471a936fbc3">
-  <!ENTITY consolekit-size          "416 KB">
-  <!ENTITY consolekit-buildsize     "8.1 MB">
+  <!ENTITY consolekit-md5sum        "6aaadf5627d2f7587aa116727e2fc1da">
+  <!ENTITY consolekit-size          "356 KB">
+  <!ENTITY consolekit-buildsize     "8.0 MB">
   <!ENTITY consolekit-time          "0.3 SBU">
 ]>
@@ -30,30 +30,44 @@
     <title>Introduction to ConsoleKit</title>
 
-    <para>The <application>ConsoleKit</application> 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.</para>
-
-    &lfs70_checked;
+    <para>
+      The <application>ConsoleKit</application> 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.
+    </para>
+
+    &lfs71_checked;
 
     <bridgehead renderas="sect3">Package Information</bridgehead>
     <itemizedlist spacing="compact">
       <listitem>
-        <para>Download (HTTP): <ulink url="&consolekit-download-http;"/></para>
-      </listitem>
-      <listitem>
-        <para>Download (FTP): <ulink url="&consolekit-download-ftp;"/></para>
-      </listitem>
-      <listitem>
-        <para>Download MD5 sum: &consolekit-md5sum;</para>
-      </listitem>
-      <listitem>
-        <para>Download size: &consolekit-size;</para>
-      </listitem>
-      <listitem>
-        <para>Estimated disk space required: &consolekit-buildsize;</para>
-      </listitem>
-      <listitem>
-        <para>Estimated build time: &consolekit-time;</para>
+        <para>
+          Download (HTTP): <ulink url="&consolekit-download-http;"/>
+        </para>
+      </listitem>
+      <listitem>
+        <para>
+          Download (FTP): <ulink url="&consolekit-download-ftp;"/>
+        </para>
+      </listitem>
+      <listitem>
+        <para>
+          Download MD5 sum: &consolekit-md5sum;
+        </para>
+      </listitem>
+      <listitem>
+        <para>
+          Download size: &consolekit-size;
+        </para>
+      </listitem>
+      <listitem>
+        <para>
+          Estimated disk space required: &consolekit-buildsize;
+        </para>
+      </listitem>
+      <listitem>
+        <para>
+          Estimated build time: &consolekit-time;
+        </para>
       </listitem>
     </itemizedlist>
@@ -74,8 +88,10 @@
 
     <warning>
-      <para>If you intend <emphasis role="strong">NOT</emphasis> to install
-      <application>polkit</application>, 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.</para>
+      <para>
+        If you intend <emphasis role="strong">NOT</emphasis> to install
+        <application>polkit</application>, 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.
+      </para>
     </warning>
 
@@ -86,6 +102,6 @@
 
     <para condition="html" role="usernotes">User Notes:
-    <ulink url="&blfs-wiki;/consolekit"/></para>
-
+      <ulink url="&blfs-wiki;/consolekit"/>
+    </para>
   </sect2>
 
@@ -93,15 +109,24 @@
     <title>Installation of ConsoleKit</title>
 
-    <para>Install <application>ConsoleKit</application> by running the following
-    commands:</para>
-
-<screen><userinput>./configure --prefix=/usr --sysconfdir=/etc \
-            --localstatedir=/var --libexecdir=/usr/lib/ConsoleKit \
+    <para>
+      Install <application>ConsoleKit</application> by running the following
+      commands:
+    </para>
+
+<screen><userinput>./configure --prefix=/usr \
+            --sysconfdir=/etc \
+            --localstatedir=/var \
+            --libexecdir=/usr/lib/ConsoleKit \
+            --enable-udev-acl \
             --enable-pam-module &amp;&amp;
 make</userinput></screen>
 
-    <para>This package does not come with a test suite.</para>
-
-    <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
+    <para>
+      This package does not come with a test suite.
+    </para>
+
+    <para>
+      Now, as the <systemitem class="username">root</systemitem> user:
+    </para>
 
 <screen role="root"><userinput>make install</userinput></screen>
@@ -112,13 +137,24 @@
     <title>Command Explanations</title>
 
-    <para><parameter>--enable-pam-module</parameter>: This switch enables
-    <application>ConsoleKit</application> to use
-    <application>Linux-PAM</application> authentication. Remove this option if
-    <application>Linux-PAM</application> is
-    <emphasis role="strong">NOT</emphasis> installed.</para>
-
-    <para><option>--enable-docbook-docs</option>: Use this parameter if
-    <application>xmlto</application> is installed and you wish to build the API
-    documentation.</para>
+    <para>
+      <option>--enable-udev-acl</option>: This switch enables building of the
+      <command>udev-acl</command> tool which is used to allow normal users
+      to access device nodes which can be accessed by
+      <systemitem class="username">root</systemitem> user only.
+    </para>
+
+    <para>
+      <option>--enable-pam-module</option>: This switch enables building of the
+      <application>ConsoleKit</application> <application>PAM</application>
+      module which is needed for <application>ConsoleKit</application> to
+      work correctly. Remove if <application>Linux PAM</application> is
+      <emphasis role="strong">NOT</emphasis> installed.
+    </para>
+
+    <para>
+      <option>--enable-docbook-docs</option>: Use this parameter if
+      <application>xmlto</application> is installed and you wish to
+      build the API documentation.
+    </para>
 
   </sect2>
@@ -127,20 +163,15 @@
     <title>Configuring ConsoleKit</title>
 
-    <sect3 id="ConsoleKit-config">
-      <title>Config Files</title>
-      <para><filename>/etc/dbus-1/system.d/ConsoleKit.conf</filename></para>
-
-      <indexterm zone="consolekit ConsoleKit-config">
-        <primary sortas="e-etc-ConsoleKit-ConsoleKit.conf">/etc/dbus-1/system.d/ConsoleKit.conf</primary>
-      </indexterm>
-    </sect3>
-
-    <sect3><title>Configuration Information</title>
+    <sect3>
+      <title>PAM Module Configuration</title>
     
-      <para>If you use <application>PAM</application> you need to configure 
-      <application>PAM</application> to activate <application>ConsoleKit
-      </application> upon user login. This can be achieved by editing the 
-      <filename>/etc/pam.d/system-session</filename> file as the 
-      <systemitem class="username">root</systemitem> user:</para>
+      <para>
+        If you use <application>Linux PAM</application> you need to
+        configure <application>Linux PAM</application> to activate
+        <application>ConsoleKit</application> upon user login.
+        This can be achieved by editing the 
+        <filename>/etc/pam.d/system-session</filename> file as the 
+        <systemitem class="username">root</systemitem> user:
+      </para>
    
 <screen role="root"><userinput>cat &gt;&gt; /etc/pam.d/system-session &lt;&lt; "EOF"
@@ -152,7 +183,39 @@
 # End ConsoleKit addition
 EOF</userinput></screen>
-   
-      <para>See /usr/share/doc/ConsoleKit/spec/ConsoleKit.html for more
-      configuration.</para>
+
+      <para>
+        You will also need a helper script that will create a file in
+        <filename class="directory">/var/run/console</filename>
+        named as username that is logged in that contains
+        <application>D-Bus</application> address of the session. Create
+        such script by running the following commands as the
+        <systemitem class="username">root</systemitem> user:
+      </para>
+
+<screen role="root"><userinput>cat &gt; /usr/lib/ConsoleKit/run-session.d/pam-foreground-compat.ck &lt;&lt; "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" &gt;&gt; "$TAGFILE"
+fi
+
+if [ "$1" = "session_removed" ] &amp;&amp; [ -e "$TAGFILE" ]; then
+    sed -i "\%^$CK_SESSION_ID\$%d" "$TAGFILE"
+    [ -s "$TAGFILE" ] || rm -f "$TAGFILE"
+fi
+EOF
+chmod 0755 /usr/lib/ConsoleKit/run-session.d/pam-foreground-compat.ck</userinput></screen>
+
+      <para>
+        See /usr/share/doc/ConsoleKit/spec/ConsoleKit.html for more
+        configuration.
+      </para>
 
     </sect3>
@@ -169,12 +232,19 @@
 
       <seglistitem>
-        <seg>ck-history, ck-launch-session, ck-list-sessions,
-        ck-log-system-restart, ck-log-system-start, ck-log-system-stop,
-        console-kit-daemon, ck-collect-session-info, ck-get-x11-display-device,
-        ck-get-x11-server-pid, ck-system-restart, and ck-system-stop</seg>
-        <seg>libck-connector.so and pam_ck_connector.so</seg>
-        <seg>/etc/ConsoleKit/{run-seat.d,run-session.d,seats.d},
-        /usr/{include/ConsoleKit/ck-connector,lib/ConsoleKit/{run-seat.d,
-        run-session.d,scripts},share/doc/ConsoleKit/spec}</seg>
+        <seg>
+          ck-history, ck-launch-session, ck-list-sessions,
+          ck-log-system-restart, ck-log-system-start,
+          ck-log-system-stop and console-kit-daemon
+        </seg>
+        <seg>
+          libck-connector.so and pam_ck_connector.so
+        </seg>
+        <seg>
+          /etc/ConsoleKit,
+          /usr/include/ConsoleKit,
+          /usr/lib/ConsoleKit,
+          /usr/share/doc/ConsoleKit and
+          /var/log/ConsoleKit
+        </seg>
       </seglistitem>
     </segmentedlist>
