#!/bin/sh

. ./test-functions

echo -n "get xattr security test:		"
tmp=$(mktemp sft-XXXXXX)
touch $tmp
setfattr -n security.simple-flow.confidential -v true $tmp
chown $SUDO_USER $tmp
su -c "getfattr -n security.simple-flow.confidential $tmp" $SUDO_USER 2> /dev/null
if [ $? != 0 ]; then
	passmsg getting xattr failed as it should
else
	failmsg able to get xattr
fi
rm -f $tmp
