diff options
Diffstat (limited to 'testing/polkit')
-rw-r--r-- | testing/polkit/PKGBUILD | 19 | ||||
-rw-r--r-- | testing/polkit/fix-empty-wheel.patch | 47 |
2 files changed, 55 insertions, 11 deletions
diff --git a/testing/polkit/PKGBUILD b/testing/polkit/PKGBUILD index 2bc0b25de..70bb6e4d8 100644 --- a/testing/polkit/PKGBUILD +++ b/testing/polkit/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 166700 2012-09-16 00:09:31Z heftig $ +# $Id: PKGBUILD 169160 2012-10-18 19:22:54Z jgc $ # Maintainer: Jan de Groot <jgc@archlinux.org> pkgname=polkit pkgver=0.107 -pkgrel=2 +pkgrel=4 pkgdesc="Application development toolkit for controlling system-wide privileges" arch=(i686 x86_64) license=('LGPL') @@ -13,22 +13,19 @@ makedepends=('intltool' 'gtk-doc' 'gobject-introspection') replaces=('policykit') options=('!libtool') install=polkit.install -source=("http://www.freedesktop.org/software/polkit/releases/$pkgname-$pkgver.tar.gz" - 'polkit.pam' - 'logind+ConsoleKit.patch' - 'autogen.sh') +source=(http://www.freedesktop.org/software/polkit/releases/$pkgname-$pkgver.tar.gz + polkit.pam fix-empty-wheel.patch) md5sums=('0e4f9c53f43fd1b25ac3f0d2e09b2ae1' '6564f95878297b954f0572bc1610dd15' - 'fb71d43442dbf24f8760198a9a79c5e7' - '38fe3119284e842e66b330b0f2ba230d') + 'c99ab2a7919ad0b69fde4804c043b07f') build() { cd $pkgname-$pkgver - patch -p1 <../logind+ConsoleKit.patch + # https://bugs.archlinux.org/task/31717 + patch -Np1 -i ../fix-empty-wheel.patch - cp ../autogen.sh . - ./autogen.sh --prefix=/usr --sysconfdir=/etc \ + ./configure --prefix=/usr --sysconfdir=/etc \ --localstatedir=/var --libexecdir=/usr/lib/polkit-1 \ --with-systemdsystemunitdir=/usr/lib/systemd/system \ --disable-static --enable-gtk-doc diff --git a/testing/polkit/fix-empty-wheel.patch b/testing/polkit/fix-empty-wheel.patch new file mode 100644 index 000000000..d6f99c43d --- /dev/null +++ b/testing/polkit/fix-empty-wheel.patch @@ -0,0 +1,47 @@ +From fa04223240d46641b0773dbf9f7d72f529046bea Mon Sep 17 00:00:00 2001 +From: David Zeuthen <zeuthen@gmail.com> +Date: Tue, 18 Sep 2012 18:47:06 +0000 +Subject: Fall back to authenticating as uid 0 if the list of admin identities is empty + +For example, this can happen if the wheel group has no members. This +was reported in Red Hat bug 834494, see + + https://bugzilla.redhat.com/show_bug.cgi?id=834494 + +Signed-off-by: David Zeuthen <zeuthen@gmail.com> +--- +diff --git a/src/polkitbackend/polkitbackendinteractiveauthority.c b/src/polkitbackend/polkitbackendinteractiveauthority.c +index 1d4a555..3bd2f0b 100644 +--- a/src/polkitbackend/polkitbackendinteractiveauthority.c ++++ b/src/polkitbackend/polkitbackendinteractiveauthority.c +@@ -1293,15 +1293,11 @@ polkit_backend_interactive_authority_get_admin_identities (PolkitBackendInteract + PolkitDetails *details) + { + PolkitBackendInteractiveAuthorityClass *klass; +- GList *ret; ++ GList *ret = NULL; + + klass = POLKIT_BACKEND_INTERACTIVE_AUTHORITY_GET_CLASS (authority); + +- if (klass->get_admin_identities == NULL) +- { +- ret = g_list_prepend (NULL, polkit_unix_user_new (0)); +- } +- else ++ if (klass->get_admin_identities != NULL) + { + ret = klass->get_admin_identities (authority, + caller, +@@ -2257,6 +2253,10 @@ authentication_agent_initiate_challenge (AuthenticationAgent *agent, + } + } + ++ /* Fall back to uid 0 if no users are available (rhbz #834494) */ ++ if (user_identities == NULL) ++ user_identities = g_list_prepend (NULL, polkit_unix_user_new (0)); ++ + session = authentication_session_new (agent, + cookie, + subject, +-- +cgit v0.9.0.2-2-gbebe |