pam_set_item - set authentication information
#include <security/pam_appl.h>
int pam_set_item (
pam_handle_t *pamh,
int item_type,
void *item
);
Thepam_set_item() function allows the caller to update PAM information as needed. The information is specified by item_type.The function copies the item to an internal storage area allocated by the authentication module. If the item had been previously set, it is overwritten.
The arguments for
pam_set_item() are:
- pamh (in)
The PAM handle, obtained from a previous call topam_start() .
- item_type (in)
This may be one of:
- 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 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 (in)
A pointer to the object to be set or updated.
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 |