1 .\" Title: pam_set_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_SET_ITEM" "3" "06/02/2006" "Linux\-PAM Manual" "Linux\-PAM Manual"
9 .\" disable hyphenation
11 .\" disable justification (adjust text to left margin only)
14 pam_set_item \- set and update PAM informations
19 #include <security/pam_modules.h>
23 .BI "int pam_set_item(pam_handle_t\ *" "pamh" ", int\ " "item_type" ", const\ void\ *" "item" ");"
28 function allows applications and PAM service modules to access and to update PAM informations of
29 \fIitem_type\fR. For this a copy of the object pointed to by the
31 argument is created. The following
32 \fIitem_type\fRs are supported:
35 The service name (which identifies that PAM stack that the PAM functions will use to authenticate the program).
38 The username of the entity under whose identity service will be given. That is, following authentication,
40 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
42 after each call to a PAM function.
45 The string used when prompting for a user's name. The default value for this string is a localized version of "login: ".
48 The terminal name: prefixed by
50 if it is a device file; for graphical, X\-based, applications the value for this item should be the
55 The requesting user name: local name for a locally requesting user or a remote user name for a remote requesting user.
57 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.
60 \fIPAM_RUSER@PAM_RHOST\fR
61 should always identify the requesting user. In some cases,
63 may be NULL. In such situations, it is unclear who the requesting entity is.
66 The requesting hostname (the hostname of the machine from which the
68 entity is requesting service). That is
69 \fIPAM_RUSER@PAM_RHOST\fR
70 does identify the requesting user. In some applications,
72 may be NULL. In such situations, it is unclear where the authentication request is originating from.
75 The authentication token (often a password). This token should be ignored by all module functions besides
76 \fBpam_sm_authenticate\fR(3)
78 \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.
81 The old authentication token. This token should be ignored by all module functions except
82 \fBpam_sm_chauthtok\fR(3).
85 The pam_conv structure. See
89 A function pointer to redirect centrally managed failure delays. See
90 \fBpam_fail_delay\fR(3).
93 \fIitem_type\fRs, other than PAM_CONV and PAM_FAIL_DELAY,
95 is a pointer to a <NUL> terminated character string. In the case of PAM_CONV,
97 points to an initialized
99 structure. In the case of PAM_FAIL_DELAY,
101 is a function pointer:
102 \fBvoid (*delay_fn)(int retval, unsigned usec_delay, void *appdata_ptr)\fR
104 Both, PAM_AUTHTOK and PAM_OLDAUTHTOK, will be reseted before returning to the application. Which means an application is not able to access the authentication tokens.
108 The application attempted to set an undefined or inaccessible item.
114 Data was successful updated.
119 passed as first argument was invalid.
123 \fBpam_get_item\fR(3),
124 \fBpam_strerror\fR(3)