pam_set_item
3
Linux-PAM
Linux-PAM Manual
pam_set_item
set and update PAM information
#include <security/pam_modules.h>
int pam_set_item
pam_handle_t *pamh
int item_type
const void *item
DESCRIPTION
The pam_set_item function allows applications
and PAM service modules to access and to update PAM information
of item_type. For this a copy
of the object pointed to by the item argument
is created. The following item_types are
supported:
The following additional items are specific to Linux-PAM and should not be used in
portable applications:
For all item_types, other than PAM_CONV and
PAM_FAIL_DELAY, item is a pointer to a <NUL>
terminated character string. In the case of PAM_CONV,
item points to an initialized
pam_conv structure. In the case of
PAM_FAIL_DELAY, item is a function pointer:
void (*delay_fn)(int retval, unsigned usec_delay, void *appdata_ptr)
Both, PAM_AUTHTOK and PAM_OLDAUTHTOK, will be reset before
returning to the application. Which means an application is not
able to access the authentication tokens.
RETURN VALUES
PAM_BAD_ITEM
The application attempted to set an undefined or inaccessible
item.
PAM_BUF_ERR
Memory buffer error.
PAM_SUCCESS
Data was successful updated.
PAM_SYSTEM_ERR
The pam_handle_t passed as first
argument was invalid.
SEE ALSO
pam_get_item3
,
pam_strerror3