pam_set_data - set module information
#include <security/pam_appl.h>
int pam_set_data (
pam_handle_t *pamh,
const char *module_data_name,
void *data,
void *(cleanup) (pam_handle_t *pamh,
void *data, int pam_end_status)
);
Thepam_set_data() function allows the PAM modules to set and update module specific information as needed. The module-specific information is stored within the PAM handle, pamh. The module_data_name uniquely identifies the data, and the data argument represents the data.The
cleanup() function is used to free any memory used by the data after it is no longer needed and is invoked bypam_end() . Ifpam_set_data() is called and the module data already exists under the same module_data_name, then the existing data are replaced by the new data and the existing cleanup function is replaced by the new cleanup function.The arguments for
pam_set_data() are:
- pamh (in)
The PAM authentication handle, obtained from a previous call topam_start() . It is used to store the module-specific data set by the function.
- module_data_name (in)
The name identifying the module data to be set. This should be unique across all services.
- data (in)
The data to be set for module_data_name supplied.
- cleanup (in)
The cleanup function to be used by pam_end defining what module-specific information needs to be purged on termination.
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 |