1pam_putenv(3PAM)             PAM Library Functions            pam_putenv(3PAM)
2
3
4

NAME

6       pam_putenv - change or add a value to the PAM environment
7

SYNOPSIS

9       cc [ flag ... ] file ... -lpam [ library ... ]
10       #include <security/pam_appl.h>
11
12
13
14       int pam_putenv(pam_handle_t *pamh, const char *name_value);
15
16

DESCRIPTION

18       The   pam_putenv() function sets the value of the PAM environment vari‐
19       able name equal to value either by altering an existing PAM variable or
20       by creating a new one.
21
22
23       The  name_value  argument  points to a string of the form name=value. A
24       call to pam_putenv() does not immediately change the  environment.  All
25       name_value pairs are stored in the PAM handle pamh. An application such
26       as  login(1)  may  make  a  call  to   pam_getenv(3PAM)  or  pam_geten‐
27       vlist(3PAM)  to retrieve the PAM environment variables saved in the PAM
28       handle and set them in the environment if appropriate. login  will  not
29       set PAM environment values which overwrite the values for  SHELL, HOME,
30       LOGNAME, MAIL, CDPATH, IFS, and  PATH. Nor will login set PAM  environ‐
31       ment values which overwrite any value that begins with  LD_.
32
33
34       If  name_value  equals   NAME=, then the value associated with  NAME in
35       the PAM handle will be set to an empty  value.   If  name_value  equals
36       NAME,  then the environment variable  NAME will be removed from the PAM
37       handle.
38

RETURN VALUES

40       The pam_putenv() function may return one of the following values:
41
42       PAM_SUCCESS        The function returned successfully.
43
44
45       PAM_OPEN_ERR       dlopen() failed when dynamically loading  a  service
46                          module.
47
48
49       PAM_SYMBOL_ERR     Symbol not found.
50
51
52       PAM_SERVICE_ERR    Error in service module.
53
54
55       PAM_SYSTEM_ERR     System error.
56
57
58       PAM_BUF_ERR        Memory buffer error.
59
60
61       PAM_CONV_ERR       Conversation failure.
62
63
64       PAM_PERM_DENIED    Permission denied.
65
66

ATTRIBUTES

68       See attributes(5) for descriptions of the following attributes:
69
70
71
72
73       ┌─────────────────────────────┬─────────────────────────────┐
74       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
75       ├─────────────────────────────┼─────────────────────────────┤
76       │Interface Stability          │ Stable                      │
77       ├─────────────────────────────┼─────────────────────────────┤
78       │MT-Level                     │MT-Safe with exceptions      │
79       └─────────────────────────────┴─────────────────────────────┘
80

SEE ALSO

82       dlopen(3C),  pam(3PAM),  pam_getenv(3PAM),  pam_getenvlist(3PAM),  lib‐
83       pam(3LIB), attributes(5)
84

NOTES

86       The interfaces in  libpam are MT-Safe only if each  thread  within  the
87       multithreaded application uses its own PAM handle.
88
89
90
91SunOS 5.11                        1 Mar 2004                  pam_putenv(3PAM)
Impressum