diff options
Diffstat (limited to 'Linux-PAM/dynamic/test.c')
-rw-r--r-- | Linux-PAM/dynamic/test.c | 27 |
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); +} |