#!/bin/sh

. ./test-functions

_new_dir=$(mktemp -d sft-XXXXXX)
./programs/setnever $_new_dir

echo -n "Tainted touch test:		"
( # Sub-shell so as not to taint the test process.
	IGNORE=$(cat confidential)
	# Should taint dir upon creating new file even without write,
	# but not here because this test has directory  set as "never."
	# Thus this creation should fail.
	_new_file=$(mktemp $_new_dir/sft-XXXXXX 2> /dev/null) # Like touch.
)

( # Sub-shell so as not to taint the test process.
	_ping=$(copy ping)
	IGNORE=$(ls $_new_dir)
	test_no_evil_bit $_ping -c 1 8.8.8.8
)
rm -rf $_new_dir
rm -f $_ping
