#include <security/pam_modules.h>
The pam_get_data function looks up the object associated with the (hopefully) unique string module_data_name in the PAM context specified by the pamh argument. A successful call to pam_get_data will result in data pointing to the object. Note, this data is not a copy and should be treated as constant by the module.
PAM_SUCCESS
PAM_SYSTEM_ERR
PAM_NO_MODULE_DATA
pam_end(3), pam_set_data(3), pam_strerror(3)