diff options
Diffstat (limited to 'patches/source/polkit')
-rw-r--r-- | patches/source/polkit/05_revert-admin-identities-unix-group-wheel.patch | 39 | ||||
-rw-r--r-- | patches/source/polkit/10-org.freedesktop.NetworkManager.pkla | 6 | ||||
-rw-r--r-- | patches/source/polkit/20-plugdev-group-mount-override.pkla | 6 | ||||
-rw-r--r-- | patches/source/polkit/doinst.sh | 13 | ||||
-rwxr-xr-x | patches/source/polkit/polkit.SlackBuild | 152 | ||||
-rw-r--r-- | patches/source/polkit/slack-desc | 19 |
6 files changed, 235 insertions, 0 deletions
diff --git a/patches/source/polkit/05_revert-admin-identities-unix-group-wheel.patch b/patches/source/polkit/05_revert-admin-identities-unix-group-wheel.patch new file mode 100644 index 000000000..1562e69db --- /dev/null +++ b/patches/source/polkit/05_revert-admin-identities-unix-group-wheel.patch @@ -0,0 +1,39 @@ +From 1892aeb9c13841335a4ac383e8a787a3c2728c45 Mon Sep 17 00:00:00 2001 +From: Michael Biebl <biebl@debian.org> +Date: Fri, 9 Dec 2011 00:31:21 +0100 +Subject: [PATCH] Revert "Default to AdminIdentities=unix-group:wheel for + local authority" + +This reverts commit 763faf434b445c20ae9529100d3ef5290976d0c9. +--- + docs/man/pklocalauthority.xml | 4 ++-- + src/polkitbackend/50-localauthority.conf | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +Index: policykit/docs/man/pklocalauthority.xml +=================================================================== +--- policykit.orig/docs/man/pklocalauthority.xml 2012-01-06 10:34:01.830221577 +0100 ++++ policykit/docs/man/pklocalauthority.xml 2012-01-06 10:39:24.206237179 +0100 +@@ -385,10 +385,10 @@ + </para> + <programlisting> + [Configuration] +-AdminIdentities=unix-group:staff ++AdminIdentities=unix-group:desktop_admin_r + </programlisting> + <para> +- specifies that any user in the <literal>staff</literal> UNIX ++ that any user in the <literal>desktop_admin_r</literal> UNIX + group can be used for authentication when administrator + authentication is needed. This file would typically be installed + in the <filename>/etc/polkit-1/localauthority.conf.d</filename> +Index: policykit/src/polkitbackend/50-localauthority.conf +=================================================================== +--- policykit.orig/src/polkitbackend/50-localauthority.conf 2012-01-06 10:33:58.254221404 +0100 ++++ policykit/src/polkitbackend/50-localauthority.conf 2012-01-06 10:39:24.210237180 +0100 +@@ -7,4 +7,4 @@ + # + + [Configuration] +-AdminIdentities=unix-group:wheel ++AdminIdentities=unix-user:0 diff --git a/patches/source/polkit/10-org.freedesktop.NetworkManager.pkla b/patches/source/polkit/10-org.freedesktop.NetworkManager.pkla new file mode 100644 index 000000000..b24916028 --- /dev/null +++ b/patches/source/polkit/10-org.freedesktop.NetworkManager.pkla @@ -0,0 +1,6 @@ +[nm-applet] +Identity=unix-group:netdev +Action=org.freedesktop.NetworkManager.* +ResultAny=yes +ResultInactive=no +ResultActive=yes diff --git a/patches/source/polkit/20-plugdev-group-mount-override.pkla b/patches/source/polkit/20-plugdev-group-mount-override.pkla new file mode 100644 index 000000000..8149de672 --- /dev/null +++ b/patches/source/polkit/20-plugdev-group-mount-override.pkla @@ -0,0 +1,6 @@ +[plugdev group mount override] +Identity=unix-group:plugdev +Action=org.freedesktop.udisks2.filesystem-*;org.freedesktop.udisks2.eject-* +ResultAny=yes +ResultInactive=yes +ResultActive=yes diff --git a/patches/source/polkit/doinst.sh b/patches/source/polkit/doinst.sh new file mode 100644 index 000000000..bce9ca90e --- /dev/null +++ b/patches/source/polkit/doinst.sh @@ -0,0 +1,13 @@ +config() { + NEW="$1" + OLD="`dirname $NEW`/`basename $NEW .new`" + # If there's no config file by that name, mv it over: + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy + rm $NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} +config etc/polkit-1/localauthority/50-local.d/20-plugdev-group-mount-override.pkla.new +config etc/polkit-1/localauthority/50-local.d/10-org.freedesktop.NetworkManager.pkla.new diff --git a/patches/source/polkit/polkit.SlackBuild b/patches/source/polkit/polkit.SlackBuild new file mode 100755 index 000000000..f0927fa4e --- /dev/null +++ b/patches/source/polkit/polkit.SlackBuild @@ -0,0 +1,152 @@ +#!/bin/sh + +# Copyright 2009, 2011 Robby Workman, Northport, Alabama, USA +# Copyright 2010 Eric Hameleers, Eindhoven, NL +# Copyright 2009, 2010, 2011, 2012, 2013 Patrick J. Volkerding, Sebeka, MN, USA +# All rights reserved. + +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +PKGNAM=polkit +VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} +BUILD=${BUILD:-4_slack14.0} + +# Automatically determine the architecture we're building on: +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) export ARCH=i486 ;; + arm*) export ARCH=arm ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) export ARCH=$( uname -m ) ;; + esac +fi + +NUMJOBS=${NUMJOBS:--j6} + +CWD=$(pwd) +TMP=${TMP:-/tmp} +PKG=$TMP/package-$PKGNAM + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +rm -rf $PKG +mkdir -p $TMP $PKG +cd $TMP +rm -rf $PKGNAM-$VERSION +tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1 +cd $PKGNAM-$VERSION || exit 1 + +# Make sure ownerships and permissions are sane: +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +zcat $CWD/05_revert-admin-identities-unix-group-wheel.patch.gz | patch -p1 --verbose || exit 1 + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --docdir=/usr/doc/$PKGNAM-$VERSION \ + --enable-man-pages \ + --enable-gtk-doc \ + --mandir=/usr/man \ + --disable-static \ + --enable-introspection \ + --with-authfw=shadow \ + --enable-verbose-mode \ + --with-os-type=Slackware \ + --build=$ARCH-slackware-linux + +#NOTE: The directory /etc/polkit-1/localauthority must be owned +# by root and have mode 700 +#NOTE: The directory /var/lib/polkit-1 must be owned +# by root and have mode 700 +#NOTE: The file ${exec_prefix}/libexec/polkit-agent-helper-1 must be owned +# by root and have mode 4755 (setuid root binary) +#NOTE: The file ${exec_prefix}/bin/pkexec must be owned by root and +# have mode 4755 (setuid root binary) + +# Build and install: +make $NUMJOBS || make || exit 1 +make install DESTDIR=$PKG || exit 1 + +# Add default policy files for udisks2 and NetworkManager events: +cat $CWD/20-plugdev-group-mount-override.pkla > $PKG/etc/polkit-1/localauthority/50-local.d/20-plugdev-group-mount-override.pkla.new +cat $CWD/10-org.freedesktop.NetworkManager.pkla > $PKG/etc/polkit-1/localauthority/50-local.d/10-org.freedesktop.NetworkManager.pkla.new + +# Strip binaries: +find $PKG | xargs file | grep -e "executable" -e "shared object" \ + | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null + +# Compress and link manpages, if any: +if [ -d $PKG/usr/man ]; then + ( cd $PKG/usr/man + for manpagedir in $(find . -type d -name "man*") ; do + ( cd $manpagedir + for eachpage in $( find . -type l -maxdepth 1) ; do + ln -s $( readlink $eachpage ).gz $eachpage.gz + rm $eachpage + done + gzip -9 *.* + ) + done + ) +fi + +# Add a documentation directory: +mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION +cp -a \ + AUTHORS COPYING HACKING INSTALL NEWS README \ + $PKG/usr/doc/$PKGNAM-$VERSION +( cd $PKG/usr/doc/$PKGNAM-$VERSION; ln -s ../../share/gtk-doc/html/polkit-1 html ) + +# If there's a ChangeLog, installing at least part of the recent history +# is useful, but don't let it get totally out of control: +if [ -r ChangeLog ]; then + DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION) + cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog + touch -r ChangeLog $DOCSDIR/ChangeLog +fi + +mkdir -p $PKG/install +zcat $CWD/doinst.sh > $PKG/install/doinst.sh +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz + diff --git a/patches/source/polkit/slack-desc b/patches/source/polkit/slack-desc new file mode 100644 index 000000000..006d8a8e5 --- /dev/null +++ b/patches/source/polkit/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler-----------------------------------------------------| +polkit: polkit (authentication framework) +polkit: +polkit: PolicyKit is an application-level toolkit for defining and handling +polkit: the policy that allows unprivileged processes to speak to privileged +polkit: processes. PolicyKit is specifically targeting applications in rich +polkit: desktop environments on multi-user UNIX-like operating systems. +polkit: +polkit: +polkit: +polkit: Home: http://www.freedesktop.org/wiki/Software/PolicyKit +polkit: |