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