1.\" $NetBSD: pam_get_item.3,v 1.9 2023/06/30 21:46:20 christos Exp $ 2.\" 3.\" Generated from pam_get_item.c by gendoc.pl 4.Dd June 27, 2023 5.Dt PAM_GET_ITEM 3 6.Os 7.Sh NAME 8.Nm pam_get_item 9.Nd get PAM information 10.Sh SYNOPSIS 11.In sys/types.h 12.In security/pam_appl.h 13.Ft "int" 14.Fn pam_get_item "const pam_handle_t *pamh" "int item_type" "const void **item" 15.Sh DESCRIPTION 16The 17.Fn pam_get_item 18function stores a pointer to the item specified by 19the 20.Fa item_type 21argument in the location pointed to by the 22.Fa item 23argument. 24The item is retrieved from the PAM context specified by the 25.Fa pamh 26argument. 27If 28.Fn pam_get_item 29fails, the 30.Fa item 31argument is untouched. 32.Pp 33The following item types are recognized: 34.Bl -tag -width 18n 35.It Dv PAM_SERVICE 36The name of the requesting service. 37.It Dv PAM_USER 38The name of the user the application is trying to 39authenticate. 40.It Dv PAM_TTY 41The name of the current terminal. 42.It Dv PAM_RHOST 43The name of the applicant's host. 44.It Dv PAM_CONV 45A 46.Vt struct pam_conv 47describing the current conversation 48function. 49.It Dv PAM_AUTHTOK 50The current authentication token. 51.It Dv PAM_OLDAUTHTOK 52The expired authentication token. 53.It Dv PAM_RUSER 54The name of the applicant. 55.It Dv PAM_USER_PROMPT 56The prompt to use when asking the applicant for a user 57name to authenticate as. 58.It Dv PAM_AUTHTOK_PROMPT 59The prompt to use when asking the applicant for an 60authentication token. 61.It Dv PAM_OLDAUTHTOK_PROMPT 62The prompt to use when asking the applicant for an 63expired authentication token prior to changing it. 64.It Dv PAM_HOST 65The name of the host the application runs on. 66.It Dv PAM_SOCKADDR 67The sockaddr_storage of the applicants's host. 68.It Dv PAM_NUSER 69The 70.Do 71nested 72.Dc 73user if this is a login on top of a previous one. 74.El 75.Pp 76See 77.Xr pam_start 3 78for a description of 79.Vt struct pam_conv . 80.Sh RETURN VALUES 81The 82.Fn pam_get_item 83function returns one of the following values: 84.Bl -tag -width 18n 85.It Bq Er PAM_SUCCESS 86Success. 87.It Bq Er PAM_BAD_ITEM 88Unrecognized or restricted item. 89.El 90.Sh SEE ALSO 91.Xr pam 3 , 92.Xr pam_set_item 3 , 93.Xr pam_start 3 , 94.Xr pam_strerror 3 95.Sh STANDARDS 96.Rs 97.%T "X/Open Single Sign-On Service (XSSO) - Pluggable Authentication Modules" 98.%D "June 1997" 99.Re 100.Sh AUTHORS 101The 102.Fn pam_get_item 103function and this manual page were 104developed for the 105.Fx 106Project by ThinkSec AS and Network Associates Laboratories, the 107Security Research Division of Network Associates, Inc.\& under 108DARPA/SPAWAR contract N66001-01-C-8035 109.Pq Dq CBOSS , 110as part of the DARPA CHATS research program. 111.Pp 112The OpenPAM library is maintained by 113.An Dag-Erling Sm\(/orgrav Aq Mt des@des.no . 114