Lines Matching refs:pamh
233 static void login_pam_end(pam_handle_t *pamh) in login_pam_end() argument
237 pamret = pam_setcred(pamh, PAM_DELETE_CRED); in login_pam_end()
240 pam_strerror(pamh, pamret), pamret); in login_pam_end()
242 pamret = pam_close_session(pamh, 0); in login_pam_end()
245 pam_strerror(pamh, pamret), pamret); in login_pam_end()
247 pamret = pam_end(pamh, pamret); in login_pam_end()
250 pam_strerror(pamh, pamret), pamret); in login_pam_end()
254 # define login_pam_end(pamh) ((void)0) argument
339 pam_handle_t *pamh; in login_main() local
413 pamret = pam_start("login", username, &conv, &pamh); in login_main()
419 pamret = pam_set_item(pamh, PAM_TTY, short_tty); in login_main()
426 pamret = pam_set_item(pamh, PAM_RHOST, opt_host); in login_main()
433 pamret = pam_authenticate(pamh, 0); in login_main()
444 pamret = pam_acct_mgmt(pamh, 0); in login_main()
446 pamret = pam_chauthtok(pamh, PAM_CHANGE_EXPIRED_AUTHTOK); in login_main()
456 if (pam_get_item(pamh, PAM_USER, (void*)&pamuser) != PAM_SUCCESS) { in login_main()
470 pamret = pam_open_session(pamh, 0); in login_main()
475 pamret = pam_setcred(pamh, PAM_ESTABLISH_CRED); in login_main()
486 pam_strerror(pamh, pamret), pamret); in login_main()
487 login_pam_end(pamh); in login_main()
549 login_pam_end(pamh); in login_main()
573 pamenv = pam_getenvlist(pamh); in login_main()