1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#include <sys/types.h> #include <sys/stat.h> #include <stdio.h> #include <string.h> #include <sys/stat.h> #include <pwd.h> #define PAM_SM_AUTH #include <security/pam_appl.h> #include <security/pam_modules.h> #include <security/pam_mod_misc.h> PAM_EXTERN int pam_sm_authenticate(pam_handle_t * pamh, int flags, int argc, const char * argv[]) {