summaryrefslogtreecommitdiffstats
path: root/testsuite/unittests/rpc_test_dummy_module.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-05 17:47:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-05 17:47:29 +0000
commit4f5791ebd03eaec1c7da0865a383175b05102712 (patch)
tree8ce7b00f7a76baa386372422adebbe64510812d4 /testsuite/unittests/rpc_test_dummy_module.c
parentInitial commit. (diff)
downloadsamba-upstream.tar.xz
samba-upstream.zip
Adding upstream version 2:4.17.12+dfsg.upstream/2%4.17.12+dfsgupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testsuite/unittests/rpc_test_dummy_module.c')
-rw-r--r--testsuite/unittests/rpc_test_dummy_module.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/testsuite/unittests/rpc_test_dummy_module.c b/testsuite/unittests/rpc_test_dummy_module.c
new file mode 100644
index 0000000..2b4e6e2
--- /dev/null
+++ b/testsuite/unittests/rpc_test_dummy_module.c
@@ -0,0 +1,21 @@
+#include "replace.h"
+#include <sys/types.h>
+#include <signal.h>
+#include <unistd.h>
+#include "libcli/util/ntstatus.h"
+
+NTSTATUS samba_init_module(void);
+NTSTATUS samba_init_module(void)
+{
+ int rc;
+
+ fprintf(stderr, "Test dummy executed!\n");
+
+ rc = setenv("UNITTEST_DUMMY_MODULE_LOADED", "TRUE", 1);
+ if (rc < 0) {
+ kill(getpid(), SIGILL);
+ exit(-1);
+ }
+
+ return NT_STATUS_OK;
+}