# pam_getenv - get a PAM environment variable - man(3) - [phpMan]

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

## NAME
       pam_getenv - get a PAM environment variable

## SYNOPSIS
### #include <security/pam_appl.h>


       **const char *pam_getenv(pam_handle_t *_**pamh_**, const char *_**name_**);**

## DESCRIPTION
       The **pam_getenv **function searches the PAM environment list as associated with the handle _pamh_
       for an item that matches the string pointed to by _name_ and returns a pointer to the value of
       the environment variable. The application is not allowed to free the data.

## RETURN VALUES
       The **pam_getenv **function returns NULL on failure.

## SEE ALSO
       [**pam_start**(3)](https://www.chedong.com/phpMan.php/man/pamstart/3/markdown), [**pam_getenvlist**(3)](https://www.chedong.com/phpMan.php/man/pamgetenvlist/3/markdown), [**pam_putenv**(3)](https://www.chedong.com/phpMan.php/man/pamputenv/3/markdown), [**pam**(7)](https://www.chedong.com/phpMan.php/man/pam/7/markdown)

Linux-PAM                                    05/07/2023                                [_PAM_GETENV_(3)](https://www.chedong.com/phpMan.php/man/PAMGETENV/3/markdown)
