#!/bin/sh

. ./test-functions

_new_dir=$(mktemp -d sft-XXXXXX)

echo -n "Tainted ln -s test:		"
( # Sub-shell so as not to taint the test process.
	_new_file=$(mktemp -u $_new_dir/sft-XXXXXX)
	IGNORE=$(cat confidential)
	# Should taint dir upon creating new file even without write 
	ln -s confidential $_new_file
)

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