summaryrefslogtreecommitdiff
path: root/lib/talloc/test_magic_differs.sh
diff options
context:
space:
mode:
authorAdrian Cochrane <adrianc@catalyst.net.nz>2015-09-04 12:59:57 +1200
committerJeremy Allison <jra@samba.org>2015-10-09 23:15:06 +0200
commit7b6d1a2a5d5561e641d9001901b9e43a64117681 (patch)
treef43691ada0b012eb886eb5e3610575ffdc548d99 /lib/talloc/test_magic_differs.sh
parent2b9bfab36d9ae0f7fa2a989195129a1a6b62393b (diff)
downloadsamba-talloc-2.1.4.tar.gz
samba-talloc-2.1.4.tar.bz2
samba-talloc-2.1.4.zip
talloc: Test that talloc magic differs between processes.talloc-2.1.4
Signed-off-by: Adrian Cochrane <adrianc@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Oct 9 23:15:06 CEST 2015 on sn-devel-104
Diffstat (limited to 'lib/talloc/test_magic_differs.sh')
-rwxr-xr-xlib/talloc/test_magic_differs.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/talloc/test_magic_differs.sh b/lib/talloc/test_magic_differs.sh
new file mode 100755
index 00000000000..0f765f0e032
--- /dev/null
+++ b/lib/talloc/test_magic_differs.sh
@@ -0,0 +1,14 @@
+#!/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"
+
+if [
+ "`./talloc_test_magic_differs_helper`" != "`./talloc_test_magic_differs_helper`"
+]; then
+ echo "failure: magic remained the same between executions"
+ exit 1
+fi
+
+echo "success: magic differs"