9 #include <security/pam_appl.h>
12 test_conv (int num_msg UNUSED, const struct pam_message **msgm UNUSED,
13 struct pam_response **response UNUSED, void *appdata_ptr UNUSED)
18 static struct pam_conv conv = {
36 fprintf(stderr, "Invalid userid: %lu\n", (unsigned long) uid);
40 pam_start("vpass", user, &conv, &pamh);
41 pam_set_item(pamh, PAM_TTY, "/dev/tty");
42 if ((res = pam_authenticate(pamh, 0)) != PAM_SUCCESS) {
43 fprintf(stderr, "Oops: %s\n", pam_strerror(pamh, res));