diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2011-04-05 14:50:57 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2011-04-05 14:53:34 +0000 |
commit | 85314dd187611074fc409c6cee98720751e499f6 (patch) | |
tree | 20d56616505f01e30331ea320c4e5ebc7b6bb412 /main/consolekit | |
parent | be43b4346b07ca95a52951304763151e7b979abd (diff) | |
download | aports-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/consolekit')
-rw-r--r-- | main/consolekit/APKBUILD | 8 | ||||
-rw-r--r-- | main/consolekit/pam-foreground-compat.ck | 17 |
2 files changed, 23 insertions, 2 deletions
diff --git a/main/consolekit/APKBUILD b/main/consolekit/APKBUILD index b5ff6878c..dfda9d30a 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 000000000..ce221c974 --- /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 |