'\" te .\" Copyright (C) 1998-2003, Carnegie Mellon Univeristy. All Rights Reserved. .\" Portions Copyright (C) 2003, Sun Microsystems, Inc. All Rights Reserved .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 \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 _ Availabilitysystem/library/security/libsasl _ Interface StabilityCommitted _ 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.