PAM Library Functions pamputenv(3PAM)
NAME
pamputenv - change or add a value to the PAM environment
SYNOPSIS
cc [ flag ... ] file ... -lpam [ library ... ]
#include
int pamputenv(pamhandlet *pamh, const char *namevalue);
DESCRIPTION
The pamputenv() function sets the value of the PAM
environment variable name equal to value either by altering
an existing PAM variable or by creating a new one.
The namevalue argument points to a string of the form
name=value. A call to pamputenv() does not immediately
change the environment. All namevalue pairs are stored in
the PAM handle pamh. An application such as login(1) may
make a call to pamgetenv(3PAM) or pamgetenvlist(3PAM) to
retrieve the PAM environment variables saved in the PAM han-
dle and set them in the environment if appropriate. login
will not set PAM environment values which overwrite the
values for SHEL, HOME, LOGNAME, MAIL, CDPATH, IFS, and
PATH. Nor will login set PAM environment values which
overwrite any value that begins with LD.
If namevalue equals NAME=, then the value associated with
NAME in the PAM handle will be set to an empty value. If
namevalue equals NAME, then the environment variable NAME
will be removed from the PAM handle.
RETURN VALUES
The pamputenv() function may return one of the following
values:
PAMSUCES The function returned successfully.
PAMOPENER dlopen() failed when dynamically loading
a service module.
PAMSYMBOLER Symbol not found.
PAMSERVICER Error in service module.
SunOS 5.11 Last change: 1 Mar 2004 1
PAM Library Functions pamputenv(3PAM)
PAMSYSTEMER System error.
PAMBUFER Memory buffer error.
PAMCONVER Conversation failure.
PAMPERMDENIED Permission denied.
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
ATRIBUTE TYPE ATRIBUTE VALUE
Interface Stability Stable
MT-Level MT-Safe with exceptions
SEE ALSO
dlopen(3C), pam(3PAM), pamgetenv(3PAM),
pamgetenvlist(3PAM), libpam(3LIB), attributes(5)
NOTES
The interfaces in libpam are MT-Safe only if each thread
within the multithreaded application uses its own PAM han-
dle.
SunOS 5.11 Last change: 1 Mar 2004 2
|