Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=gnometesting.git;a=commitdiff;h=172b9085f9a84f51100659248b6abe6f654fc45b

commit 172b9085f9a84f51100659248b6abe6f654fc45b
Author: Baste <[email protected]>
Date:   Tue Sep 25 13:47:03 2012 +0200

polkit-0.107-1-x86_64
* Version bump

diff --git a/source/apps/polkit/FrugalBuild b/source/apps/polkit/FrugalBuild
index 1858c7c..7af0511 100644
--- a/source/apps/polkit/FrugalBuild
+++ b/source/apps/polkit/FrugalBuild
@@ -2,62 +2,27 @@
# Maintainer: bouleetbil <[email protected]>

pkgname=polkit
-pkgver=0.105
+pkgver=0.107
pkgrel=1
pkgdesc="Policy framework for controlling privileges for system-wide services"
-url="http://hal.freedesktop.org/docs/PolicyKit";
-depends=('pam' 'dbus-glib' 'expat' 'eggdbus' 'systemd')
+url="http://www.freedesktop.org/wiki/Software/polkit";
+depends=('pam' 'dbus-glib' 'expat' 'systemd' 'spidermonkey')
makedepends=('intltool' 'gobject-introspection>=0.9.0' 'docbook-xsl')
groups=('apps')
archs=('i686' 'x86_64' 'arm')
up2date="Flasttar http://www.freedesktop.org/software/$pkgname/releases";
-source=(http://www.freedesktop.org/software/$pkgname/releases/$pkgname-$pkgver.tar.gz)
-sha1sums=('53d56484a5bffb0aaf645c8d813b3063e01e8423')
+source=(http://www.freedesktop.org/software/$pkgname/releases/$pkgname-$pkgver.tar.gz
 fallbacktouid0.patch)
+sha1sums=('d20aa07971226c86eafa4b8fd9f01d6880927e63' \
+          '023c3bc26fc88307f133a41c79a80ae421e6dfd5')

replaces=('policykit')
conflicts=('policykit')
options=('scriptlet')

build() {
-#      Fbuild --with-authdb=default --with-authfw=pam 
--with-os-type=FrugalWare \
-#      --disable-selinux
-#      Fcp $pkgname-$pkgver/src/polkitagent/polkitagentenumtypes.h 
usr/include/polkit-1/polkitagent/
-       Fbuild --with-os-type=FrugalWare --disable-selinux --enable-systemd=yes 
--enable-introspection
-
-###
-### BEGIN DESKTOP POLICY CONFIGURATION ###
-###
-
-cat > $Fdestdir/etc/polkit-1/localauthority.conf.d/60-desktop-policy.conf << 
EOF
-# This allows users in the wheel group to authenticate as the
-# administrator.
-#
-# DO NOT EDIT THIS FILE, it will be overwritten on update.
-
-[Configuration]
-AdminIdentities=unix-group:wheel
-EOF
-
-cat > 
$Fdestdir/var/lib/polkit-1/localauthority/10-vendor.d/10-desktop-policy.pkla << 
EOF
-# Authorizations/policy for the wheel group.
-#
-# DO NOT EDIT THIS FILE, it will be overwritten on update.
-#
-# Allow users in the wheel group to do certain actions without being
-# interrupted by password dialogs
-#
-[Wheel Group Permissions]
-Identity=unix-group:wheel
-Action=org.gnome.settingsdaemon.datetimemechanism.*;org.kde.kcontrol.kcmclock.save;org.freedesktop.RealtimeKit1.*;org.freedesktop.udisks.filesystem-mount-system-internal;org.freedesktop.hostname1.set-static-hostname
-ResultAny=auth_admin
-ResultInactive=auth_admin
-ResultActive=yes
-EOF
-
-###
-### END DESKTOP POLICY CONFIGURATION
-###
-
+       Fbuild --with-os-type=FrugalWare --disable-selinux --enable-systemd=yes 
--enable-introspection --enable-examples
+       Fdirschown etc/polkit-1/rules.d 67 root
+       Fdirschown usr/share/polkit-1/rules.d 67 root
}

# optimization OK
diff --git a/source/apps/polkit/fallbacktouid0.patch 
b/source/apps/polkit/fallbacktouid0.patch
new file mode 100644
index 0000000..99fb65e
--- /dev/null
+++ b/source/apps/polkit/fallbacktouid0.patch
@@ -0,0 +1,53 @@
+From fa04223240d46641b0773dbf9f7d72f529046bea Mon Sep 17 00:00:00 2001
+From: David Zeuthen <[email protected]>
+Date: Tue, 18 Sep 2012 14:47:06 -0400
+Subject: [PATCH] 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 <[email protected]>
+---
+ src/polkitbackend/polkitbackendinteractiveauthority.c | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+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,
+--
+1.7.12
+
+
diff --git a/source/apps/polkit/polkit.install 
b/source/apps/polkit/polkit.install
index f39fdea..54acc20 100644
--- a/source/apps/polkit/polkit.install
+++ b/source/apps/polkit/polkit.install
@@ -1,14 +1,16 @@
post_install() {
-        if ! grep -q 'polkituser' /etc/group; then
-               echo "added polkituser"
+        if grep -q 'polkituser' /etc/group; then
+                /usr/sbin/groupdel polkituser 2>/dev/null
+                /usr/sbin/userdel polkituser 2>/dev/null
+        fi
+
+        if ! grep -q 'polkitd' /etc/group; then
+               echo "added polkitd"
#create group
-               /usr/sbin/groupadd -g 67 polkituser 2>/dev/null
+               /usr/sbin/groupadd -g 67 polkitd 2>/dev/null
#create user
-               /usr/sbin/useradd -s /bin/false -c "polkituser" -u 67 -g 
polkituser polkituser 2>/dev/null
+               /usr/sbin/useradd -r -s /bin/false -c "polkitd" -u 67 -g 
polkitd -d / polkitd 2>/dev/null
fi
-       #create directory
-       mkdir -p /var/run/polkit-1 2>/dev/null
-       mkdir -p /var/lib/polkit-1 2>/dev/null
}

post_upgrade()
@@ -19,8 +21,11 @@ post_upgrade()

pre_remove()
{
-       rm -Rf /var/run/polkit-1 2>/dev/null
-       rm -Rf /var/lib/polkit-1 2>/dev/null
+       if grep -q 'polkitd' /etc/group; then
+                /usr/sbin/groupdel polkitd 2>/dev/null
+                /usr/sbin/userdel polkitd 2>/dev/null
+        fi
+
}

op=$1
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to