1PAM_GETENVLIST(3)              Linux-PAM Manual              PAM_GETENVLIST(3)
2
3
4

NAME

6       pam_getenvlist - getting the PAM environment
7

SYNOPSIS

9       #include <security/pam_appl.h>
10
11       char **pam_getenvlist(pam_handle_t *pamh);
12

DESCRIPTION

14       The pam_getenvlist function returns a complete copy of the PAM
15       environment as associated with the handle pamh. The PAM environment
16       variables represent the contents of the regular environment variables
17       of the authenticated user when service is granted.
18
19       The format of the memory is a malloc()'d array of char pointers, the
20       last element of which is set to NULL. Each of the non-NULL entries in
21       this array point to a NUL terminated and malloc()'d char string of the
22       form: "name=value".
23
24       It should be noted that this memory will never be free()'d by libpam.
25       Once obtained by a call to pam_getenvlist, it is the responsibility of
26       the calling application to free() this memory.
27
28       It is by design, and not a coincidence, that the format and contents of
29       the returned array matches that required for the third argument of the
30       execle(3) function call.
31

RETURN VALUES

33       The pam_getenvlist function returns NULL on failure.
34

SEE ALSO

36       pam_start(3), pam_getenv(3), pam_putenv(3), pam(8)
37
38
39
40Linux-PAM Manual                  11/25/2020                 PAM_GETENVLIST(3)
Impressum