Commit 732a364d authored by Oliver Pinter's avatar Oliver Pinter
Browse files

HBSD: add hbsd control tests


Signed-off-by: default avatarOliver Pinter <oliver.pinter@hardenedbsd.org>
parent c4460db2
#!/bin/sh
test=`mktemp`
cat > $test<<EOF
#!/bin/sh
procstat -v \$\$
EOF
chmod +x $test
hbsdcontrol system aslr disable $test
$test | awk '{print $2" "$3}' > $test.a
$test | awk '{print $2" "$3}' > $test.b
cmp -s $test.a $test.b
ret=$?
if [ $ret == 0 ]
then
echo "test failed"
vimdiff $test.a $test.b
exit 1
else
echo "test passed"
rm $test
rm $test.a $test.b
exit 0
fi
#!/bin/sh
test=`mktemp`
cat > $test<<EOF
#!/bin/sh
procstat -v \$\$
EOF
chmod +x $test
secadm add pax $test a
echo $test
secadm show
rulenum=`secadm show | grep $test | cut -d ':' -f 1 | cut -d '+' -f 2`
$test | awk '{print $2" "$3}' > $test.a
$test | awk '{print $2" "$3}' > $test.b
cmp -s $test.a $test.b
ret=$?
secadm del $rulenum
if [ $ret == 0 ]
then
echo "test failed"
vimdiff $test.a $test.b
exit 1
else
echo "test passed"
rm $test
rm $test.a $test.b
exit 0
fi
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment