summaryrefslogtreecommitdiffstats
path: root/truecrypt
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2007-05-26 14:10:50 +0000
committer Eric Hameleers <alien@slackware.com>2007-05-26 14:10:50 +0000
commit213f4c441e1b31a7676bc19384bee81e72ecadf8 (patch)
treef5d7f3687ff2dceceffeb84f5594254c7dc5171e /truecrypt
parentf30eedc270c98c74073a056196e888a1bf887b3d (diff)
downloadasb-213f4c441e1b31a7676bc19384bee81e72ecadf8.tar.gz
asb-213f4c441e1b31a7676bc19384bee81e72ecadf8.tar.xz
Update for 4.3a
Diffstat (limited to 'truecrypt')
-rwxr-xr-xtruecrypt/build/truecrypt.SlackBuild55
1 files changed, 19 insertions, 36 deletions
diff --git a/truecrypt/build/truecrypt.SlackBuild b/truecrypt/build/truecrypt.SlackBuild
index 89856a3d..769fea20 100755
--- a/truecrypt/build/truecrypt.SlackBuild
+++ b/truecrypt/build/truecrypt.SlackBuild
@@ -21,6 +21,8 @@
# * Fix compilation under kernels 2.6.18 and 2.6.19.
# 4.3: 15/apr/2007 by Eric Hameleers <alien@slackware.com>
# * Update.
+# 4.3a: 26/may/2007 by Eric Hameleers <alien@slackware.com>
+# * Update. This fixes a security issue with seteuid.
#
# Run 'sh SlackBuild --cleanup' to build a Slackware package.
# The package (.tgz) plus descriptive .txt file are created in /tmp .
@@ -31,7 +33,7 @@
# --- INIT ---
PRGNAM=truecrypt
-VERSION=${VERSION:-4.3}
+VERSION=${VERSION:-4.3a}
ARCH=${ARCH:-i486}
BUILD=1
@@ -44,8 +46,8 @@ SOURCE="${PRGNAM}-${VERSION}-source-code.tar.gz"
PATCH0="${PRGNAM}-${VERSION}_ksrc.patch"
# Where do we look for sources?
-CWD=`pwd`
-SRCDIR=`dirname $0`
+CWD=$(pwd)
+SRCDIR=$(dirname $0)
[ "${SRCDIR:0:1}" == "." ] && SRCDIR=${CWD}/${SRCDIR}
# Place to build (TMP) package (PKG) and output (OUTPUT) the program:
@@ -53,12 +55,10 @@ TMP=${TMP:-/tmp/build}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-
-# ---------------------------------------------------------------------
-# If you do *not* want non-admin users to be able to use truecrypt, set
-# BINPERM=0750
-BINPERM=4755
-# ---------------------------------------------------------------------
+# ------------------------------------------------------------------------
+# truecrypt used to be installed with setuid root - as of 4.3a the program
+# will use 'sudo' to get elevated rights.
+# ------------------------------------------------------------------------
##
## --- with a little luck, you won't have to edit below this point --- ##
@@ -72,7 +72,7 @@ set -u
P1=${1:-1}
# Slackware 11 and up need other option (gcc > 3.3.x)
-if [ `gcc -dumpversion | tr -d '.' |cut -c 1-2` -gt 33 ]; then
+if [ $(gcc -dumpversion | tr -d '.' |cut -c 1-2) -gt 33 ]; then
MOPT=tune
else
MOPT=cpu
@@ -152,10 +152,10 @@ patch -p0 < $SRCDIR/${PATCH0} 2>&1 | tee $OUTPUT/patch-${PRGNAM}.log
CFLAGS="$SLKCFLAGS" \
KERNEL_VER=$KVER KERNEL_SRC=$KSRC \
-./build.sh 2>&1 | tee $OUTPUT/build-${PRGNAM}.log
+./build.sh 2>&1 | tee $OUTPUT/make-${PRGNAM}.log
# Run a test
-./Cli/truecrypt --test 2>&1 | tee -a $OUTPUT/build-${PRGNAM}.log
+./Cli/truecrypt --test 2>&1 | tee -a $OUTPUT/make-${PRGNAM}.log
#
# Install all the needed stuff to the package dir
@@ -171,7 +171,6 @@ chmod 600 $PKG/lib/modules/$KVER/extra/truecrypt.ko
cd ..
-# --- DOINST.SH ---
# And now write the doinst.sh :
mkdir -p $PKG/install
cat <<-EEOOTT > $PKG/install/doinst.sh
@@ -190,9 +189,6 @@ cat <<-EEOOTT > $PKG/install/doinst.sh
echo "Please install the 'device-mapper' package before trying to use truecrypt."
fi
- # Set the correct access bits on the binary:
- chmod $BINPERM usr/bin/truecrypt
-
# Make the device mapper module load on boot:
if ! grep -e "^[^#]* dm-mod" \${RCMODULES} >/dev/null ; then
echo "# Loading device mapper module (for truecrypt amongst others)" >> \${RCMODULES}
@@ -221,9 +217,7 @@ cat <<-EEOOTT > $PKG/install/doinst.sh
fi
EEOOTT
-
-# --- DOCUMENTATION ---
-
+# Add documentation:
cp Release/Readme.txt README.1st
cp Release/Setup\ Files/TrueCrypt\ User\ Guide.pdf userguide.pdf
@@ -232,23 +226,18 @@ cp -a $DOCS \
$PKG/usr/doc/$PRGNAM-$VERSION
chmod -R a-w $PKG/usr/doc/$PRGNAM-$VERSION/*
-# Compress the man page(s)
-[ -d $PKG/usr/man ] && find $PKG/usr/man -name "*.?" -type f -exec gzip -9f {} \;
+# Compress the man page(s):
+if [ -d $PKG/usr/man ]; then
+ find $PKG/usr/man -name "*.?" -type f -exec gzip -9f {} \;
+fi
-# Strip binaries
+# Strip binaries:
( cd $PKG
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
)
-
-# --- OWNERSHIP, RIGHTS ---
-
-chmod -R o-w $PKG
-
-
-# --- PACKAGE DESCRIPTION ---
-
+# Add a package description:
mkdir -p $PKG/install
cat $SRCDIR/slack-desc > $PKG/install/slack-desc
# Substitute correct versions
@@ -257,9 +246,6 @@ if [ -f $SRCDIR/slack-required ]; then
cat $SRCDIR/slack-required > $PKG/install/slack-required
fi
-
-# --- BUILDING ---
-
# Build the package:
cd $PKG
makepkg --linkadd y --chown n $OUTPUT/${PRGNAM}-${VERSION}_$(echo $KVER | tr - _)-${ARCH}-${BUILD}.tgz \
@@ -270,9 +256,6 @@ if [ -f $PKG/install/slack-required ]; then
cat $PKG/install/slack-required > $OUTPUT/${PRGNAM}-${VERSION}_$(echo $KVER | tr - _)-${ARCH}-${BUILD}.dep
fi
-
-# --- CLEANUP ---
-
# Clean up the extra stuff:
if [ "$P1" = "--cleanup" ]; then
rm -rf $TMP/tmp-$PRGNAM