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