aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-04-05 14:50:57 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2011-04-05 14:53:34 +0000
commit85314dd187611074fc409c6cee98720751e499f6 (patch)
tree20d56616505f01e30331ea320c4e5ebc7b6bb412 /main
parentbe43b4346b07ca95a52951304763151e7b979abd (diff)
downloadaports-85314dd187611074fc409c6cee98720751e499f6.tar.bz2
aports-85314dd187611074fc409c6cee98720751e499f6.tar.xz
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
Diffstat (limited to 'main')
-rw-r--r--main/consolekit/APKBUILD8
-rw-r--r--main/consolekit/pam-foreground-compat.ck17
2 files changed, 23 insertions, 2 deletions
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 <ncopa@alpinelinux.org>
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