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

NAME

6       pam_putenv - set or change PAM environment variable
7

SYNOPSIS

9       #include <security/pam_appl.h>
10
11       int pam_putenv(pam_handle_t *pamh, const char *name_value);
12

DESCRIPTION

14       The pam_putenv function is used to add or change the value of PAM
15       environment variables as associated with the pamh handle.
16
17       The pamh argument is an authentication handle obtained by a prior call
18       to pam_start(). The name_value argument is a single NUL terminated
19       string of one of the following forms:
20
21       NAME=value of variable
22          In this case the environment variable of the given NAME is set to
23          the indicated value: value of variable. If this variable is already
24          known, it is overwritten. Otherwise it is added to the PAM
25          environment.
26
27       NAME=
28          This function sets the variable to an empty value. It is listed
29          separately to indicate that this is the correct way to achieve such
30          a setting.
31
32       NAME
33          Without an '=' the pam_putenv() function will delete the
34          corresponding variable from the PAM environment.
35

RETURN VALUES

37       PAM_PERM_DENIED
38          Argument name_value given is a NULL pointer.
39
40       PAM_BAD_ITEM
41          Variable requested (for deletion) is not currently set.
42
43       PAM_ABORT
44          The pamh handle is corrupt.
45
46       PAM_BUF_ERR
47          Memory buffer error.
48
49       PAM_SUCCESS
50          The environment variable was successfully updated.
51

SEE ALSO

53       pam_start(3), pam_getenv(3), pam_getenvlist(3), pam_strerror(3), pam(8)
54
55
56
57Linux-PAM Manual                  06/27/2006                     PAM_PUTENV(3)
Impressum