libcap/pam_cap/test.c
Andrew Morgan cd45c57c35 Build with a pam_cap module.
Note, I've been confused about the capset/capget system calls.
It would seem that the current way(TM) is to get the raw API
from libc.
2007-08-13 23:34:41 -07:00

13 lines
240 B
C

#include <stdio.h>
#include <stdlib.h>
#include <security/pam_modules.h>
int main(int argc, char **argv)
{
if (pam_sm_authenticate(NULL, 0, 0, NULL) != PAM_SUCCESS) {
printf("failed to authenticate\n");
exit(1);
}
exit(0);
}