summaryrefslogtreecommitdiff
path: root/lib/talloc/test_magic_differs.sh
blob: 1b6ba2e4d4557b2d011150f967c964f433abb541 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh
# This test ensures that two different talloc processes do not use the same
# magic value to lessen the opportunity for transferrable attacks.

echo "test: magic differs"

helper=$1
m1=$($helper)
m2=$($helper)

if [ $m1 -eq $m2 ]; then
	echo "failure: magic remained the same between executions ($m1 vs $m2)"
	exit 1
fi

echo "success: magic differs"