summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorngie <ngie@FreeBSD.org>2016-10-21 08:22:39 +0000
committerngie <ngie@FreeBSD.org>2016-10-21 08:22:39 +0000
commit7e2bfca8319de91ba7758fe50b5c08dbd4e7f17b (patch)
treeef339da52db315c464624582ce5fdf00dea7cf85 /tests
parent13d5943eb1c48958acff57c5b739063af9033b4d (diff)
downloadFreeBSD-src-7e2bfca8319de91ba7758fe50b5c08dbd4e7f17b.zip
FreeBSD-src-7e2bfca8319de91ba7758fe50b5c08dbd4e7f17b.tar.gz
MFC r305916,r305918:
r305916: Make sure $TMPDIR is created with 0755 permissions This is required to ensure that the temporary script can be executed, as the default mode is apparently too restrictive r305918: Only chmod $TMPDIR if it's not /tmp This is a safety belt to ensure that the /tmp sticky bit stuff doesn't get whacked by accident if someone runs the script outright
Diffstat (limited to 'tests')
-rw-r--r--tests/sys/mac/bsdextended/matches_test.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/sys/mac/bsdextended/matches_test.sh b/tests/sys/mac/bsdextended/matches_test.sh
index 11cac81..929bbca 100644
--- a/tests/sys/mac/bsdextended/matches_test.sh
+++ b/tests/sys/mac/bsdextended/matches_test.sh
@@ -36,6 +36,12 @@ if ! sysctl -N security.mac.bsdextended >/dev/null 2>&1; then
echo "1..0 # SKIP mac_bsdextended(4) support isn't available"
exit 0
fi
+if [ "$TMPDIR" != "/tmp" ]; then
+ if ! chmod -Rf 0755 $TMPDIR; then
+ echo "1..0 # SKIP failed to chmod $TMPDIR"
+ exit 0
+ fi
+fi
if ! playground=$(mktemp -d $TMPDIR/tmp.XXXXXXX); then
echo "1..0 # SKIP failed to create temporary directory"
exit 0
OpenPOWER on IntegriCloud