From 85314dd187611074fc409c6cee98720751e499f6 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Tue, 5 Apr 2011 14:50:57 +0000 Subject: main/consolekit: use pam compat hook from debian this fixes 'at_console' for dbus so logged in users are allowed to communicate with org.bluez. (bluetooth-applet and bluez-simple-agent) was found here: http://git.debian.org/?p=pkg-utopia/consolekit.git;a=tree;f=debian;hb=HEAD --- main/consolekit/APKBUILD | 8 ++++++-- main/consolekit/pam-foreground-compat.ck | 17 +++++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 main/consolekit/pam-foreground-compat.ck (limited to 'main') diff --git a/main/consolekit/APKBUILD b/main/consolekit/APKBUILD index b5ff6878cb..dfda9d30ac 100644 --- a/main/consolekit/APKBUILD +++ b/main/consolekit/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Natanael Copa pkgname=consolekit pkgver=0.4.4 -pkgrel=1 +pkgrel=2 pkgdesc="Framework for defining and tracking users, login sessions, and seats" url="http://www.freedesktop.org/wiki/Software/ConsoleKit" arch="all" @@ -13,6 +13,7 @@ install= subpackages="$pkgname-dev $pkgname-doc" source="http://www.freedesktop.org/software/ConsoleKit/dist/ConsoleKit-$pkgver.tar.bz2 0001-busybox-reboot-and-poweroff-support.patch + pam-foreground-compat.ck " _builddir="$srcdir"/ConsoleKit-$pkgver @@ -40,7 +41,10 @@ build() { package() { cd "$_builddir" make DESTDIR="$pkgdir" install || return 1 + install -m 755 "$srcdir"/pam-foreground-compat.ck \ + "$pkgdir"/usr/lib/ConsoleKit/run-session.d/ } md5sums="b57eb18eae8c4d3631d5f4f030218a29 ConsoleKit-0.4.4.tar.bz2 -acc4f44190cd677f95fd529d528c9cef 0001-busybox-reboot-and-poweroff-support.patch" +acc4f44190cd677f95fd529d528c9cef 0001-busybox-reboot-and-poweroff-support.patch +d75ed3438dab01552304c06fd9a967b1 pam-foreground-compat.ck" diff --git a/main/consolekit/pam-foreground-compat.ck b/main/consolekit/pam-foreground-compat.ck new file mode 100644 index 0000000000..ce221c9749 --- /dev/null +++ b/main/consolekit/pam-foreground-compat.ck @@ -0,0 +1,17 @@ +#!/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 -- cgit v1.2.3