summaryrefslogtreecommitdiff
path: root/Linux-PAM/dynamic/test.c
diff options
context:
space:
mode:
authorSteve Langasek <steve.langasek@ubuntu.com>2019-01-03 12:44:11 -0800
committerSteve Langasek <steve.langasek@ubuntu.com>2019-01-03 12:44:11 -0800
commitefd31890b5ed496a5a00c08a262da240e66a4ddc (patch)
tree22a7aab22b3a491bb58df250d7d6409e0c160bcc /Linux-PAM/dynamic/test.c
parent067affee9267fa0d1c21835182ba639ba33e820f (diff)
New upstream version 0.76
Diffstat (limited to 'Linux-PAM/dynamic/test.c')
-rw-r--r--Linux-PAM/dynamic/test.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/Linux-PAM/dynamic/test.c b/Linux-PAM/dynamic/test.c
new file mode 100644
index 00000000..35496fe4
--- /dev/null
+++ b/Linux-PAM/dynamic/test.c
@@ -0,0 +1,27 @@
+#include <stdio.h>
+#include <dlfcn.h>
+#include <unistd.h>
+
+#include <security/pam_appl.h>
+#include <security/pam_misc.h>
+
+int main(int argc, char **argv)
+{
+ void *handle;
+
+ handle = dlopen("./pam.so", RTLD_NOW);
+ if (handle == NULL) {
+ fprintf(stderr, "failed to load pam.so: %s\n", dlerror());
+ exit(1);
+ }
+
+ /* handle->XXX points to each of the PAM functions */
+
+
+ if (dlclose(handle)) {
+ fprintf(stderr, "failed to unload pam.so: %s\n", dlerror());
+ exit(1);
+ }
+
+ exit(0);
+}