#!/bin/sh

nevers="
	/home/$SUDO_USER/.bash_history
	/home/$SUDO_USER/.viminfo
	/root/.bash_history
	/var/log/lastlog
"

trusted="
	/usr/bin/Xorg
	/usr/bin/xfce4-session
	/usr/bin/dbus-daemon
	/usr/lib/systemd/systemd
	/usr/lib/systemd/systemd-journald
	/usr/lib/systemd/systemd-logind
"

waittrusted="
	$(ls /home/$SUDO_USER/simple-flow-rest/test/test-case*)
	/home/$SUDO_USER/simple-flow-rest/test/test-all
"

for file in $nevers; do
	echo reset never $file
	setfattr -n security.simple-flow.confidential -v never $file
done

for file in $trusted; do
	echo reset trusted $file
	setfattr -n security.simple-flow.trusted -v true $file
done

for file in $waittrusted; do
	echo reset wait-trusted $file
	setfattr -n security.simple-flow.trusted -v wait $file
done
