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