Returns a list of all of the defined PAM environment variables and their values.
PAM Library (libpam.a)
#include <security/pam_appl.h>
char **pam_getenvlist (PAMHandle)
pam_handle_t *PAMHandle;
The pam_getenvlist subroutine returns a pointer to a list of the currently defined environment variables in the PAM handle, PAMHandle. Environment variables can be set through calls to the pam_putenv() subroutine. The library returns the environment in an allocated array in which the last entry of the array is NULL. The caller is responsible for freeing the memory of the returned list.
Item | Description |
---|---|
PAMHandle | The PAM handle representing the current user authentication session. This handle is obtained by a call to pam_start(). |
Upon successful completion, pam_getenvlist returns a pointer to a list of strings, one for each currently defined PAM environment variable. Each string is of the form VARIABLE=VALUE, where VARIABLE is the name of the variable and VALUE is its value. This list is terminated with a NULL entry. If the routine fails or there are no PAM environment variables defined, a NULL reference is returned. The caller is responsible for freeing the memory of the returned value.