# phpman > man > pam_get_data(3)

[PAM_GET_DATA(3)](https://www.chedong.com/phpMan.php/man/PAMGETDATA/3/markdown)                           Linux-PAM Manual                           [PAM_GET_DATA(3)](https://www.chedong.com/phpMan.php/man/PAMGETDATA/3/markdown)



## NAME
       pam_get_data - get module internal data

## SYNOPSIS
       **#include** **<security/pam**___**modules.h>**

       **int** **pam**___**get**___**data(const** **pam**___**handle**___**t** *****_pamh_**,** **const** **char** *****_module_data_name_**,** **const** **void** ******_data_**);**

## DESCRIPTION
       This function together with the **pam**___**set**___**[data**(3)](https://www.chedong.com/phpMan.php/man/data/3/markdown) function is useful to manage module-specific
       data meaningful only to the calling PAM module.

       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.

## RETURN VALUES
       PAM_SUCCESS
           Data was successful retrieved.

       PAM_SYSTEM_ERR
           A NULL pointer was submitted as PAM handle or the function was called by an application.

       PAM_NO_MODULE_DATA
           Module data not found or there is an entry, but it has the value NULL.

## SEE ALSO
       **pam**___**[end**(3)](https://www.chedong.com/phpMan.php/man/end/3/markdown), **pam**___**set**___**[data**(3)](https://www.chedong.com/phpMan.php/man/data/3/markdown), **pam**___**[strerror**(3)](https://www.chedong.com/phpMan.php/man/strerror/3/markdown)



Linux-PAM Manual                             06/08/2020                              [PAM_GET_DATA(3)](https://www.chedong.com/phpMan.php/man/PAMGETDATA/3/markdown)
