1 .\" Title: pam_get_item
3 .\" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/>
5 .\" Manual: Linux\-PAM Manual
6 .\" Source: Linux\-PAM Manual
8 .TH "PAM_GET_ITEM" "3" "06/27/2006" "Linux\-PAM Manual" "Linux\-PAM Manual"
9 .\" disable hyphenation
11 .\" disable justification (adjust text to left margin only)
14 pam_get_item \- getting PAM informations
19 #include <security/pam_modules.h>
23 .BI "int pam_get_item(const\ pam_handle_t\ *" "pamh" ", int\ " "item_type" ", const\ void\ **" "item" ");"
28 function allows applications and PAM service modules to access and retrieve PAM informations of
29 \fIitem_type\fR. Upon successful return,
31 contains a pointer to the value of the corresponding item. Note, this is a pointer to the
36 \fIfree()\fR'ed or over\-written! The following values are supported for
40 The service name (which identifies that PAM stack that the PAM functions will use to authenticate the program).
43 The username of the entity under whose identity service will be given. That is, following authentication,
45 identifies the local entity that gets to use the service. Note, this value can be mapped from something (eg., "anonymous") to something else (eg. "guest119") by any module in the PAM stack. As such an application should consult the value of
47 after each call to a PAM function.
50 The string used when prompting for a user's name. The default value for this string is a localized version of "login: ".
53 The terminal name: prefixed by
55 if it is a device file; for graphical, X\-based, applications the value for this item should be the
60 The requesting user name: local name for a locally requesting user or a remote user name for a remote requesting user.
62 Generally an application or module will attempt to supply the value that is most strongly authenticated (a local account before a remote one. The level of trust in this value is embodied in the actual authentication stack associated with the application, so it is ultimately at the discretion of the system administrator.
65 \fIPAM_RUSER@PAM_RHOST\fR
66 should always identify the requesting user. In some cases,
68 may be NULL. In such situations, it is unclear who the requesting entity is.
71 The requesting hostname (the hostname of the machine from which the
73 entity is requesting service). That is
74 \fIPAM_RUSER@PAM_RHOST\fR
75 does identify the requesting user. In some applications,
77 may be NULL. In such situations, it is unclear where the authentication request is originating from.
80 The authentication token (often a password). This token should be ignored by all module functions besides
81 \fBpam_sm_authenticate\fR(3)
83 \fBpam_sm_chauthtok\fR(3). In the former function it is used to pass the most recent authentication token from one stacked module to another. In the latter function the token is used for another purpose. It contains the currently active authentication token.
86 The old authentication token. This token should be ignored by all module functions except
87 \fBpam_sm_chauthtok\fR(3).
90 The pam_conv structure. See
94 A function pointer to redirect centrally managed failure delays. See
95 \fBpam_fail_delay\fR(3).
97 If a service module wishes to obtain the name of the user, it should not use this function, but instead perform a call to
98 \fBpam_get_user\fR(3).
100 Only a service module is privileged to read the authentication tokens, PAM_AUTHTOK and PAM_OLDAUTHTOK.
104 The application attempted to set an undefined or inaccessible item.
115 Data was successful updated.
120 passed as first argument was invalid.
124 \fBpam_set_item\fR(3),
125 \fBpam_strerror\fR(3)