Defines a PAM environment variable.
PAM Library (libpam.a)
#include <security/pam_appl.h>
int pam_putenv (PAMHandle, NameValue)
pam_handle_t *PAMHandle;
const char *NameValue;
The pam_putenv subroutine sets and deletes environment variables in the PAM handle, PAMHandle. Applications can retrieve the defined variables by calling pam_getenv() or pam_getenvlist() and add them to the user's session. If a variable with the same name is already defined, the old value is replaced by the new value.
Item | Description |
---|---|
PAMHandle | The PAM authentication handle, obtained from a previous call to pam_start(). |
NameValue | A string of the form name=value to
be stored in the environment section of the PAM handle. The following
behavior is exhibited with regards to the format of the passed-in
string:
|
Upon successful completion, pam_putenv returns PAM_SUCCESS. If the routine fails, either PAM_SYSTEM_ERR or PAM_BUF_ERR is returned, depending on the actual error.
Item | Description |
---|---|
PAM_SYSTEM_ERR | A system error occurred. |
PAM_BUF_ERR | A memory error occurred. |