pam_get_item - get PAM information
int pam_get_item ( pam_handle_t *pamh, int item_type, void **item );
pam_get_item()function returns to the caller the PAM information for the item_type supplied. item is assigned the address of the requested item. The data within the item is valid until it is modified by a subsequent call to pam_set_item(). If the item has not been previously set, a NULL pointer is returned.
An item retrieved by
pam_get_item()should not be modified or freed. It will be released by pam_end().
The arguments for
- pamh (in)
The PAM authentication handle, obtained from a previous call to
- item_type (in)
The item type for which the PAM information is requested. This may be:
The service name.
The user name.
The user authentication token.
The old user authentication token.
The tty name.
The remote host name.
The remote user name.
The pam_conv structure.
The default prompt used by
The item types PAM_AUTHTOK and PAM_OLDAUTHTOK are available only to the PAM service modules for security reasons. The authentication module, account module, and session management module should treat PAM_AUTHTOK as the current authentication token, and should ignore PAM_OLDAUTHTOK. The password management module should treat PAM_OLDAUTHTOK as the current authentication token and PAM_AUTHTOK as the new authentication token.
- item (out)
The address of a pointer into which is returned the address of the object requested.
One of the following PAM status codes shall be returned:
Memory buffer error.
[??] Some characters or strings that appear in the printed document are not easily representable using HTML.