'\" 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 "Oct 14, 2003" .SH NAME sasl_seterror \- set the error string .SH SYNOPSIS .LP .nf \fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lsasl\fR [ \fIlibrary\fR ... ] #include \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 .na \fB\fIconn\fR\fR .ad .RS 9n The \fBsasl_conn_t\fR for which the call to \fBsasl_seterror()\fR applies. .RE .sp .ne 2 .na \fB\fIflags\fR\fR .ad .RS 9n If set to \fBSASL_NOLOG\fR, the call to \fBsasl_seterror()\fR is not logged. .RE .sp .ne 2 .na \fB\fIfmt\fR\fR .ad .RS 9n 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(7) for descriptions of the following attributes: .sp .sp .TS box; c | c l | l . ATTRIBUTE TYPE ATTRIBUTE VALUE _ Interface Stability Evolving _ MT-Level MT-Safe .TE .SH SEE ALSO .sp .LP .BR syslog (3C), .BR sasl_errdetail (3SASL), .BR attributes (7) .sp .LP Whistler, K. and Adams, G. \fIRFC 2482, Language Tagging in Unicode Plain Text\fR. Network Working Group. January 1999.