2 .\" Copyright (c) 1998, Sun Microsystems, Inc. All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH PAM_GETENV 3PAM "Oct 13, 1998"
8 pam_getenv \- returns the value for a PAM environment name
12 \fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lpam\fR [ \fIlibrary\fR ... ]
13 #include <security/pam_appl.h>
17 \fBchar *\fR\fBpam_getenv\fR(\fBpam_handle_t *\fR\fIpamh\fR, \fBconst char *\fR\fIname\fR);
23 The \fBpam_getenv()\fR function searches the \fBPAM\fR handle \fIpamh\fR for a
24 value associated with \fIname\fR. If a value is present, \fBpam_getenv()\fR
25 makes a copy of the value and returns a pointer to the copy back to the calling
26 application. If no such entry exists, \fBpam_getenv()\fR returns \fINULL\fR.
27 It is the responsibility of the calling application to free the memory returned
28 by \fBpam_getenv()\fR.
32 If successful, \fBpam_getenv()\fR returns a copy of the \fIvalue\fR associated
33 with \fIname\fR in the \fBPAM\fR handle; otherwise, it returns a \fINULL\fR
38 See \fBattributes\fR(5) for descriptions of the following attributes:
46 ATTRIBUTE TYPE ATTRIBUTE VALUE
48 Interface Stability Stable
50 MT-Level MT-Safe with exceptions
56 \fBpam\fR(3PAM), \fBpam_getenvlist\fR(3PAM), \fBpam_putenv\fR(3PAM),
57 \fBlibpam\fR(3LIB), \fBattributes\fR(5)
61 The interfaces in \fBlibpam\fR are MT-Safe only if each thread within the
62 multithreaded application uses its own \fBPAM\fR handle.