summaryrefslogtreecommitdiff
path: root/source/l/polkit/polkit.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/l/polkit/polkit.SlackBuild')
-rwxr-xr-xsource/l/polkit/polkit.SlackBuild32
1 files changed, 16 insertions, 16 deletions
diff --git a/source/l/polkit/polkit.SlackBuild b/source/l/polkit/polkit.SlackBuild
index 74193f13..7aa40f5d 100755
--- a/source/l/polkit/polkit.SlackBuild
+++ b/source/l/polkit/polkit.SlackBuild
@@ -1,8 +1,8 @@
#!/bin/sh
-# Copyright 2009 Robby Workman, Northport, Alabama, USA
+# Copyright 2009, 2011 Robby Workman, Northport, Alabama, USA
# Copyright 2010 Eric Hameleers, Eindhoven, NL
-# Copyright 2009, 2010 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2009, 2010, 2011 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
# Redistribution and use of this script, with or without modification, is
@@ -24,9 +24,8 @@
PKGNAM=polkit
-VERSION=${VERSION:-1_14bdfd8}
-BUILD=${BUILD:-1}
-NUMJOBS=${NUMJOBS:--j6}
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-2}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
@@ -38,6 +37,8 @@ if [ -z "$ARCH" ]; then
esac
fi
+NUMJOBS=${NUMJOBS:--j6}
+
CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
@@ -60,12 +61,9 @@ rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
rm -rf $PKGNAM-$VERSION
-tar xvf $CWD/$PKGNAM-$VERSION.tar.bz2 || exit 1
+tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1
cd $PKGNAM-$VERSION || exit 1
-# Apply the patch that makes --with-authfw=shadow work
-cat $CWD/polkit-1-shadow.diff | patch -p1 --verbose || exit 1
-
# Make sure ownerships and permissions are sane:
chown -R root:root .
find . \
@@ -74,27 +72,29 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-# Configure:
-# Using polkit-user=hald for now for easier transition; I don't think the
-# separate user account is actually required any more, but I could be wrong
+# https://bugzilla.redhat.com/show_bug.cgi?id=692922
+patch -p1 < $CWD/CVE-2011-1485/0001-PolkitUnixProcess-Clarify-that-the-real-uid-is-retur.patch || exit 1
+patch -p1 < $CWD/CVE-2011-1485/0002-Make-PolkitUnixProcess-also-record-the-uid-of-the-pr.patch || exit 1
+patch -p1 < $CWD/CVE-2011-1485/0003-Use-polkit_unix_process_get_uid-to-get-the-owner-of-.patch || exit 1
+patch -p1 < $CWD/CVE-2011-1485/0004-pkexec-Avoid-TOCTTOU-problems-with-parent-process.patch || exit 1
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
-./autogen.sh \
+./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
- --enable-gtk-doc \
--docdir=/usr/doc/$PKGNAM-$VERSION \
--enable-man-pages \
+ --enable-gtk-doc \
--mandir=/usr/man \
--disable-static \
--disable-introspection \
--with-authfw=shadow \
--enable-verbose-mode \
+ --with-os-type=Slackware \
--build=$ARCH-slackware-linux
- # Deprecated:
- #--with-polkit-user=hald \
#NOTE: The directory /etc/polkit-1/localauthority must be owned
# by root and have mode 700