1 /* 2 * No copyright is claimed. This code is in the public domain; do with 3 * it what you wish. 4 * 5 * Written by Karel Zak <kzak@redhat.com> 6 */ 7 #ifndef UTIL_LINUX_PAMFAIL_H 8 #include <security/pam_appl.h> 9 #include <security/pam_misc.h> 10 #include "c.h" 11 12 static inline int pam_fail_check(pam_handle_t * pamh,int retcode)13pam_fail_check(pam_handle_t *pamh, int retcode) 14 { 15 if (retcode == PAM_SUCCESS) 16 return 0; 17 warnx("%s", pam_strerror(pamh, retcode)); 18 pam_end(pamh, retcode); 19 return 1; 20 } 21 22 #endif /* UTIL_LINUX_PAMFAIL_H */ 23