fix: separate cargo target-dirs to avoid parallel lock contention, add pam smoke test
This commit is contained in:
18
tests/pam_smoke_test.c
Normal file
18
tests/pam_smoke_test.c
Normal file
@@ -0,0 +1,18 @@
|
||||
#include <dlfcn.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
if (argc < 2) {
|
||||
fprintf(stderr, "Usage: %s <libahfail_pam.so>\n", argv[0]);
|
||||
return 1;
|
||||
}
|
||||
void *lib = dlopen(argv[1], RTLD_NOW);
|
||||
if (!lib) { fprintf(stderr, "dlopen: %s\n", dlerror()); return 1; }
|
||||
if (!dlsym(lib, "pam_sm_authenticate")) {
|
||||
fprintf(stderr, "pam_sm_authenticate not found\n");
|
||||
dlclose(lib);
|
||||
return 1;
|
||||
}
|
||||
dlclose(lib);
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user