Lines Matching refs:sshpam_handle

225 static pam_handle_t *sshpam_handle = NULL;  variable
328 if ((err = pam_putenv(sshpam_handle, env)) != PAM_SUCCESS) { in import_environments()
330 pam_strerror(sshpam_handle, sshpam_err)); in import_environments()
441 sshpam_err = pam_get_item(sshpam_handle, PAM_USER, in sshpam_thread()
465 sshpam_err = pam_set_item(sshpam_handle, PAM_CONV, in sshpam_thread()
469 sshpam_err = pam_authenticate(sshpam_handle, flags); in sshpam_thread()
479 sshpam_err = pam_chauthtok(sshpam_handle, in sshpam_thread()
502 env_from_pam = pam_getenvlist(sshpam_handle); in sshpam_thread()
517 pam_strerror(sshpam_handle, sshpam_err)); in sshpam_thread()
601 if (sshpam_handle == NULL || (use_privsep && !mm_is_monitor())) in sshpam_cleanup()
604 pam_set_item(sshpam_handle, PAM_CONV, (const void *)&null_conv); in sshpam_cleanup()
607 pam_close_session(sshpam_handle, PAM_SILENT); in sshpam_cleanup()
612 pam_setcred(sshpam_handle, PAM_DELETE_CRED); in sshpam_cleanup()
616 pam_end(sshpam_handle, sshpam_err); in sshpam_cleanup()
617 sshpam_handle = NULL; in sshpam_cleanup()
627 if (sshpam_handle != NULL) { in sshpam_init()
629 sshpam_err = pam_get_item(sshpam_handle, in sshpam_init()
633 pam_end(sshpam_handle, sshpam_err); in sshpam_init()
634 sshpam_handle = NULL; in sshpam_init()
638 pam_start(SSHD_PAM_SERVICE, user, &store_conv, &sshpam_handle); in sshpam_init()
642 pam_end(sshpam_handle, sshpam_err); in sshpam_init()
643 sshpam_handle = NULL; in sshpam_init()
648 sshpam_err = pam_set_item(sshpam_handle, PAM_RHOST, pam_rhost); in sshpam_init()
650 pam_end(sshpam_handle, sshpam_err); in sshpam_init()
651 sshpam_handle = NULL; in sshpam_init()
661 sshpam_err = pam_set_item(sshpam_handle, PAM_TTY, "ssh"); in sshpam_init()
663 pam_end(sshpam_handle, sshpam_err); in sshpam_init()
664 sshpam_handle = NULL; in sshpam_init()
762 debug3("PAM: %s", pam_strerror(sshpam_handle, type)); in sshpam_query()
906 sshpam_err = pam_acct_mgmt(sshpam_handle, 0); in do_pam_account()
908 pam_strerror(sshpam_handle, sshpam_err)); in do_pam_account()
927 sshpam_err = pam_set_item(sshpam_handle, PAM_TTY, tty); in do_pam_set_tty()
930 pam_strerror(sshpam_handle, sshpam_err)); in do_pam_set_tty()
937 sshpam_err = pam_set_item(sshpam_handle, PAM_CONV, in do_pam_setcred()
941 pam_strerror(sshpam_handle, sshpam_err)); in do_pam_setcred()
944 sshpam_err = pam_setcred(sshpam_handle, PAM_ESTABLISH_CRED); in do_pam_setcred()
947 sshpam_err = pam_setcred(sshpam_handle, PAM_REINITIALIZE_CRED); in do_pam_setcred()
955 pam_strerror(sshpam_handle, sshpam_err)); in do_pam_setcred()
958 pam_strerror(sshpam_handle, sshpam_err)); in do_pam_setcred()
1026 sshpam_err = pam_set_item(sshpam_handle, PAM_CONV, in do_pam_chauthtok()
1030 pam_strerror(sshpam_handle, sshpam_err)); in do_pam_chauthtok()
1032 sshpam_err = pam_chauthtok(sshpam_handle, PAM_CHANGE_EXPIRED_AUTHTOK); in do_pam_chauthtok()
1035 pam_strerror(sshpam_handle, sshpam_err)); in do_pam_chauthtok()
1042 sshpam_err = pam_set_item(sshpam_handle, PAM_CONV, in do_pam_session()
1046 pam_strerror(sshpam_handle, sshpam_err)); in do_pam_session()
1047 sshpam_err = pam_open_session(sshpam_handle, 0); in do_pam_session()
1054 pam_strerror(sshpam_handle, sshpam_err)); in do_pam_session()
1082 ret = pam_putenv(sshpam_handle, compound); in do_pam_putenv()
1098 return (pam_getenvlist(sshpam_handle)); in fetch_pam_environment()
1184 if (!options.use_pam || sshpam_handle == NULL) in sshpam_auth_passwd()
1200 sshpam_err = pam_set_item(sshpam_handle, PAM_CONV, in sshpam_auth_passwd()
1204 pam_strerror(sshpam_handle, sshpam_err)); in sshpam_auth_passwd()
1206 sshpam_err = pam_authenticate(sshpam_handle, flags); in sshpam_auth_passwd()
1215 pam_strerror(sshpam_handle, sshpam_err)); in sshpam_auth_passwd()