Lines Matching refs:pamh
103 static const char *get_option(const pam_handle_t *pamh, const char *option, in get_option() argument
106 if (!pamh) { in get_option()
145 int encrypt_decrypt_data(const pam_handle_t *pamh, int isencrypt, in encrypt_decrypt_data() argument
162 pam_syslog(pamh, LOG_DEBUG, "Invalid inputs"); in encrypt_decrypt_data()
173 pam_syslog(pamh, LOG_DEBUG, in encrypt_decrypt_data()
180 pam_syslog(pamh, LOG_DEBUG, in encrypt_decrypt_data()
193 pam_syslog(pamh, LOG_DEBUG, "EVP_CipherInit_ex failed with %d", in encrypt_decrypt_data()
206 pam_syslog(pamh, LOG_DEBUG, in encrypt_decrypt_data()
212 pam_syslog(pamh, LOG_DEBUG, "EVP_CipherUpdate returns with %d", in encrypt_decrypt_data()
223 pam_syslog(pamh, LOG_DEBUG, in encrypt_decrypt_data()
240 FILE *get_temp_file_handle(const pam_handle_t *pamh, char *const tempfilename) in get_temp_file_handle() argument
247 pam_syslog(pamh, LOG_DEBUG, "Error in creating temp file"); in get_temp_file_handle()
251 pam_syslog(pamh, LOG_DEBUG, "Temporary file name is %s", tempfilename); in get_temp_file_handle()
270 int update_pass_special_file(const pam_handle_t *pamh, const char *keyfilename, in update_pass_special_file() argument
318 pam_syslog(pamh, LOG_DEBUG, "Not enough buffer, bailing out"); in update_pass_special_file()
324 pam_syslog(pamh, LOG_DEBUG, "Unable to open key file %s", in update_pass_special_file()
329 pam_syslog(pamh, LOG_DEBUG, "Key file read failed"); in update_pass_special_file()
339 pwfile = get_temp_file_handle(pamh, tempfilename); in update_pass_special_file()
415 pamh, 0, cipher, key, keylen, in update_pass_special_file()
430 pam_syslog(pamh, LOG_DEBUG, in update_pass_special_file()
499 pam_syslog(pamh, LOG_DEBUG, in update_pass_special_file()
512 pam_syslog(pamh, LOG_DEBUG, in update_pass_special_file()
523 pam_syslog(pamh, LOG_DEBUG, "Ctext buffer failed, bailing out"); in update_pass_special_file()
531 if (encrypt_decrypt_data(pamh, 1, cipher, key, keylen, iv, in update_pass_special_file()
535 pam_syslog(pamh, LOG_DEBUG, "Encryption failed"); in update_pass_special_file()
553 pam_syslog(pamh, LOG_DEBUG, "Error in writing meta data"); in update_pass_special_file()
557 pam_syslog(pamh, LOG_DEBUG, "Error in writing hash data"); in update_pass_special_file()
561 pam_syslog(pamh, LOG_DEBUG, "Error in writing IV data"); in update_pass_special_file()
565 pam_syslog(pamh, LOG_DEBUG, "Error in encrypted data"); in update_pass_special_file()
569 pam_syslog(pamh, LOG_DEBUG, "Error in writing MAC"); in update_pass_special_file()
578 pamh, LOG_DEBUG, in update_pass_special_file()
585 pam_syslog(pamh, LOG_DEBUG, in update_pass_special_file()
595 pam_syslog(pamh, LOG_DEBUG, in update_pass_special_file()
626 int pam_sm_chauthtok(pam_handle_t *pamh, int flags, int argc, const char **argv) in pam_sm_chauthtok() argument
633 get_option(pamh, "spec_grp_name", argc, argv); in pam_sm_chauthtok()
635 get_option(pamh, "spec_pass_file", argc, argv); in pam_sm_chauthtok()
636 const char *key_file = get_option(pamh, "key_file", argc, argv); in pam_sm_chauthtok()
646 retval = pam_get_user(pamh, &user, NULL); in pam_sm_chauthtok()
655 retval = pam_get_item(pamh, PAM_AUTHTOK, &item); in pam_sm_chauthtok()
664 grp = pam_modutil_getgrnam(pamh, spec_grp_name); in pam_sm_chauthtok()
675 pam_syslog(pamh, LOG_DEBUG, "User belongs to special grp: %x", in pam_sm_chauthtok()
684 pam_syslog(pamh, LOG_ERR, in pam_sm_chauthtok()
694 pamh, LOG_ERR, in pam_sm_chauthtok()
699 pam_syslog(pamh, LOG_ERR, in pam_sm_chauthtok()
704 pamh, key_file, spec_pass_file, user, pass_new); in pam_sm_chauthtok()