summaryrefslogtreecommitdiffstats
path: root/test_magic_differs_helper.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-05 17:44:22 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-05 17:44:22 +0000
commitf866ab5a13eace05b4850480663aba7f605841c4 (patch)
tree1459b24f43702a2658ffa4751800bdac970ba54f /test_magic_differs_helper.c
parentInitial commit. (diff)
downloadtalloc-upstream.tar.xz
talloc-upstream.zip
Adding upstream version 2.4.0.upstream/2.4.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--test_magic_differs_helper.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/test_magic_differs_helper.c b/test_magic_differs_helper.c
new file mode 100644
index 0000000..6798827
--- /dev/null
+++ b/test_magic_differs_helper.c
@@ -0,0 +1,12 @@
+#include <stdio.h>
+#include "talloc.h"
+
+/*
+ * This program is called by a testing shell script in order to ensure that
+ * if the library is loaded into different processes it uses different magic
+ * values in order to thwart security attacks.
+ */
+int main(int argc, char *argv[]) {
+ printf("%i\n", talloc_test_get_magic());
+ return 0;
+}