fix: separate cargo target-dirs to avoid parallel lock contention, add pam smoke test

This commit is contained in:
Asger Geel Weirsøe
2026-05-06 12:10:02 +02:00
parent 0f128d1c6f
commit 692cd76ceb
2 changed files with 33 additions and 5 deletions

18
tests/pam_smoke_test.c Normal file
View 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;
}