Closed Jnchi closed 5 years ago
#include <dlfcn.h>
#include <stdio.h>
#include <stdlib.h>
int main(int argc, const char* argv[])
{
if ( argc != 2 )
{
printf("Usage: ./dlopentest <path_to_pam_module>\n");
exit(1);
}
void *libhandle = dlopen(argv[1], RTLD_NOW);
if ( libhandle == NULL )
{
printf("%s",dlerror());
exit(1);
}
void* sym = dlsym(libhandle,"pam_sm_authenticate");
if ( sym == NULL )
{
printf("%s",dlerror());
exit(1);
}
sym = dlsym(libhandle,"pam_sm_setcred");
if ( sym == NULL )
{
printf("%s",dlerror());
exit(1);
}
dlclose(libhandle);
}
src/jwt_test.c
src/rest_test.c
test/pam_test.c
Postman
Resources:
linux-pam/tests/
See also: