pam_get_item - get PAM information
#include <security/pam_appl.h>
int pam_get_item (
pam_handle_t *pamh,
int item_type,
void **item
);
Thepam_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 topam_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 bypam_end() .The arguments for
pam_get_item() are:
- pamh (in)
The PAM authentication handle, obtained from a previous call topam_start() .
- item_type (in)
The item type for which the PAM information is requested. This may be:
- PAM_SERVICE
The service name.
- PAM_USER
The user name.
- PAM_AUTHOK
The user authentication token.
- PAM_OLDAUTHOK
The old user authentication token.
- PAM_TTY
The tty name.
- PAM_RHOST
The remote host name.
- PAM_RUSER
The remote user name.
- PAM_CONV
The pam_conv structure.
- PAM_USER_PROMPT
The default prompt used bypam_get_user() .
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:
- [PAM_SUCCESS]
Successful completion.
- [PAM_SYSTEM_ERR]
System error.
- [PAM_BUF_ERR]
Memory buffer error.
[??] Some characters or strings that appear in the printed document are not easily representable using HTML.
Contents | Next section | Index |