'\" te
.\" Copyright (c) 2003, Sun Microsystems, Inc.   All Rights Reserved.
.\" 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.
.\" 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.
.\" 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]
.TH PAM_STRERROR 3PAM "Jul 9, 2003"
.SH NAME
pam_strerror \- get PAM error message string
.SH SYNOPSIS
.LP
.nf
\fBcc\fR [ \fIflag\fR... ] \fIfile\fR... \fB-lpam\fR [ \fIlibrary\fR... ]
#include <security/pam_appl.h>



\fBconst char *\fR\fBpam_strerror\fR(\fBpam_handle_t*\fR\fIpamh\fR, \fBint\fR \fIerrnum\fR);
.fi

.SH DESCRIPTION
.sp
.LP
The \fBpam_strerror()\fR function maps the \fBPAM\fR error number in
\fIerrnum\fR to a \fBPAM\fR error message string, and returns a pointer to that
string. The application should not free or modify the string returned.
.sp
.LP
The \fIpamh\fR argument is the  \fBPAM\fR handle obtained by a prior call to
\fBpam_start()\fR. If \fBpam_start()\fR returns an error, a null \fBPAM\fR
handle should be passed.
.SH ERRORS
.sp
.LP
The \fBpam_strerror()\fR function returns the string "Unknown error" if
\fIerrnum\fR is out-of-range.
.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(7) for description of the following attributes:
.sp

.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE	ATTRIBUTE VALUE
_
Interface Stability	 Stable
_
MT-Level	MT-Safe with exceptions
.TE

.SH SEE ALSO
.sp
.LP
.BR pam (3PAM),
.BR pam_start (3PAM),
.BR attributes (7)
.SH NOTES
.sp
.LP
The interfaces in  \fBlibpam\fR are MT-Safe only if each thread within the
multithreaded application uses its own  \fBPAM\fR handle.