summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xextra/consolekit/.footprint.i6861
-rwxr-xr-xextra/consolekit/.footprint.x86_641
-rwxr-xr-xextra/consolekit/.md5sum.i6861
-rwxr-xr-xextra/consolekit/.md5sum.x86_641
-rwxr-xr-xextra/consolekit/Pkgfile9
-rw-r--r--extra/consolekit/pam-foreground-compat.ck16
6 files changed, 26 insertions, 3 deletions
diff --git a/extra/consolekit/.footprint.i686 b/extra/consolekit/.footprint.i686
index 577382604..28d4f2132 100755
--- a/extra/consolekit/.footprint.i686
+++ b/extra/consolekit/.footprint.i686
@@ -27,6 +27,7 @@ drwxr-xr-x root/root usr/lib/ConsoleKit/
-rwxr-xr-x root/root usr/lib/ConsoleKit/ck-get-x11-server-pid
drwxr-xr-x root/root usr/lib/ConsoleKit/run-seat.d/
drwxr-xr-x root/root usr/lib/ConsoleKit/run-session.d/
+-rwxr-xr-x root/root usr/lib/ConsoleKit/run-session.d/pam-foreground-compat.ck
drwxr-xr-x root/root usr/lib/ConsoleKit/scripts/
-rwxr-xr-x root/root usr/lib/ConsoleKit/scripts/ck-system-restart
-rwxr-xr-x root/root usr/lib/ConsoleKit/scripts/ck-system-stop
diff --git a/extra/consolekit/.footprint.x86_64 b/extra/consolekit/.footprint.x86_64
index 577382604..28d4f2132 100755
--- a/extra/consolekit/.footprint.x86_64
+++ b/extra/consolekit/.footprint.x86_64
@@ -27,6 +27,7 @@ drwxr-xr-x root/root usr/lib/ConsoleKit/
-rwxr-xr-x root/root usr/lib/ConsoleKit/ck-get-x11-server-pid
drwxr-xr-x root/root usr/lib/ConsoleKit/run-seat.d/
drwxr-xr-x root/root usr/lib/ConsoleKit/run-session.d/
+-rwxr-xr-x root/root usr/lib/ConsoleKit/run-session.d/pam-foreground-compat.ck
drwxr-xr-x root/root usr/lib/ConsoleKit/scripts/
-rwxr-xr-x root/root usr/lib/ConsoleKit/scripts/ck-system-restart
-rwxr-xr-x root/root usr/lib/ConsoleKit/scripts/ck-system-stop
diff --git a/extra/consolekit/.md5sum.i686 b/extra/consolekit/.md5sum.i686
index 1b94c75d5..c0a4662bb 100755
--- a/extra/consolekit/.md5sum.i686
+++ b/extra/consolekit/.md5sum.i686
@@ -1 +1,2 @@
b57eb18eae8c4d3631d5f4f030218a29 ConsoleKit-0.4.4.tar.bz2
+a8a4de71d9b0549b8143e5f6c2a36fc7 pam-foreground-compat.ck
diff --git a/extra/consolekit/.md5sum.x86_64 b/extra/consolekit/.md5sum.x86_64
index 1b94c75d5..c0a4662bb 100755
--- a/extra/consolekit/.md5sum.x86_64
+++ b/extra/consolekit/.md5sum.x86_64
@@ -1 +1,2 @@
b57eb18eae8c4d3631d5f4f030218a29 ConsoleKit-0.4.4.tar.bz2
+a8a4de71d9b0549b8143e5f6c2a36fc7 pam-foreground-compat.ck
diff --git a/extra/consolekit/Pkgfile b/extra/consolekit/Pkgfile
index 39bdfd437..964f3ff34 100755
--- a/extra/consolekit/Pkgfile
+++ b/extra/consolekit/Pkgfile
@@ -7,8 +7,9 @@
name=consolekit
version=0.4.4
-release=1
-source=(http://www.freedesktop.org/software/ConsoleKit/dist/ConsoleKit-$version.tar.bz2)
+release=3
+source=(http://www.freedesktop.org/software/ConsoleKit/dist/ConsoleKit-$version.tar.bz2
+ pam-foreground-compat.ck)
build() {
cd ConsoleKit-$version
@@ -18,9 +19,11 @@ build() {
--localstatedir=/var \
--libexecdir=/usr/lib/ConsoleKit \
--enable-pam-module \
- --enable-docbook-docs
+ --enable-docbook-docs \
+ --with-dbus-services=$PKG/usr/share/dbus-1/services
make
make DESTDIR=$PKG install
+ install -m755 $SRC/pam-foreground-compat.ck $PKG/usr/lib/ConsoleKit/run-session.d/
}
diff --git a/extra/consolekit/pam-foreground-compat.ck b/extra/consolekit/pam-foreground-compat.ck
new file mode 100644
index 000000000..7f6b122d5
--- /dev/null
+++ b/extra/consolekit/pam-foreground-compat.ck
@@ -0,0 +1,16 @@
+#!/bin/sh
+TAGDIR=/var/run/console
+
+[ -n "$CK_SESSION_USER_UID" ] || exit 1
+
+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