Package: openssl-blacklist
Severity: normal
Hi,
when rebuilding openssl-blacklist from Squeeze for Univention Corporate Server,
a
Debian derived distribution based on Debian stable (currently Lenny, our next
release will be based on Squeeze), we noticed an error in the test suite,
which makes openssl-blacklist FTBFS when build as root:
The test suite contains the following patch:
echo "Permission denied:"
noperms="$tmpdir/unreadable"
touch "$noperms"
chmod 0 "$noperms"
if ./openssl-vulnkey "$noperms" 2>/dev/null || [ "$?" != "2" ]; then
echo "FAIL"
error="yes"
else
echo "PASS"
fi
This fails when build as root, since root can access the file despite
it being chmodded to 0 and leads to a FTBFS.
Attached patch skips this specific test when build as root.
Cheers,
Moritz
diff -aur openssl-blacklist-0.5.orig//test.sh openssl-blacklist-0.5/test.sh
--- openssl-blacklist-0.5.orig//test.sh 2011-02-08 06:36:58.000000000 +0100
+++ openssl-blacklist-0.5/test.sh 2011-02-08 06:41:03.000000000 +0100
@@ -161,16 +161,21 @@
echo "PASS"
fi
+
echo ""
-echo "Permission denied:"
-noperms="$tmpdir/unreadable"
-touch "$noperms"
-chmod 0 "$noperms"
-if ./openssl-vulnkey "$noperms" 2>/dev/null || [ "$?" != "2" ]; then
- echo "FAIL"
- error="yes"
+if [ `id -u` = "0" ]; then
+ echo "Skipping permission test, since run as root"
else
- echo "PASS"
+ echo "Permission denied:"
+ noperms="$tmpdir/unreadable"
+ touch "$noperms"
+ chmod 0 "$noperms"
+ if ./openssl-vulnkey "$noperms" 2>/dev/null || [ "$?" != "2" ]; then
+ echo "FAIL"
+ error="yes"
+ else
+ echo "PASS"
+ fi
fi
# cleanup and report