summaryrefslogtreecommitdiff
path: root/usr/src/man/man3sasl/sasl_seterror.3sasl
blob: 5e193bffc9704e9fb0be87ab2f175fd45e23b304 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
'\" te
.\" Copyright (C) 1998-2003, Carnegie Mellon Univeristy.  All Rights Reserved.
.\" Portions 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 sasl_seterror 3SASL "14 Oct 2003" "SunOS 5.11" "Simple Authentication Security Layer Library Functions"
.SH NAME
sasl_seterror \- set the error string
.SH SYNOPSIS
.LP
.nf
\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lsasl\fR   [ \fIlibrary\fR ... ]
#include <sasl/sasl.h>

\fBvoid\fR \fBsasl_seterror\fR(\fBsasl_conn_t *\fR\fIconn\fR, \fBunsigned\fR \fIflags\fR,
     \fBconst char *\fR\fIfmt\fR, ...);
.fi

.SH DESCRIPTION
.sp
.LP
The \fBsasl_seterror()\fR interface sets the error string that will be returned
by \fBsasl_errdetail\fR(3SASL). Use \fBsyslog\fR(3C) style formatting, that is,
use \fBprintf()\fR\(emstyle with \fB%m\fR as the most recent \fBerrno\fR error.
.sp
.LP
The \fBsasl_seterror()\fR interface is primarily used by server callback
functions and internal plug-ins, for example, with the \fBsasl_authorize_t\fR
callback. The \fBsasl_seterror()\fR interface triggers a call to the SASL
logging callback, if any, with a level of \fBSASL_LOG_FAIL\fR, unless the
\fBSASL_NOLOG\fR flag is set.
.sp
.LP
Make the message string sensitive to the current language setting. If there is
no \fBSASL_CB_LANGUAGE\fR callback, message strings must be \fBi-default\fR.
Otherwise, UTF-8 is used. Use of \fIRFC 2482\fR for mixed-language text is
encouraged.
.sp
.LP
If the value of \fIconn\fR is \fINULL\fR, the \fBsasl_seterror()\fR interface
fails.
.SH PARAMETERS
.sp
.ne 2
.mk
.na
\fB\fIconn\fR\fR
.ad
.RS 9n
.rt  
The \fBsasl_conn_t\fR for which the call to \fBsasl_seterror()\fR applies.
.RE

.sp
.ne 2
.mk
.na
\fB\fIflags\fR\fR
.ad
.RS 9n
.rt  
If set to \fBSASL_NOLOG\fR, the call to \fBsasl_seterror()\fR is not logged.
.RE

.sp
.ne 2
.mk
.na
\fB\fIfmt\fR\fR
.ad
.RS 9n
.rt  
A \fBsyslog\fR(3C) style format string.
.RE

.SH RETURN VALUES
.sp
.LP
\fBsasl_seterror()\fR has no return values.
.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp

.sp
.TS
tab() box;
cw(2.75i) |cw(2.75i) 
lw(2.75i) |lw(2.75i) 
.
ATTRIBUTE TYPEATTRIBUTE VALUE
_
Interface StabilityEvolving
_
MT-LevelMT-Safe
.TE

.SH SEE ALSO
.sp
.LP
\fBsasl_errdetail\fR(3SASL), \fBsyslog\fR(3C), \fBattributes\fR(5)
.sp
.LP
Whistler, K. and Adams, G. \fIRFC 2482, Language Tagging in Unicode Plain
Text\fR. Network Working Group. January 1999.