2 .\" Copyright (C) 1998-2003, Carnegie Mellon Univeristy. All Rights Reserved.
3 .\" Portions Copyright (C) 2003, Sun Microsystems,
4 .\" Inc. All Rights Reserved
5 .\" 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.
6 .\" 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.
7 .\" 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]
8 .TH SASL_SERVER_NEW 3SASL "Oct 14, 2003"
10 sasl_server_new \- create a new server authentication object
14 \fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lsasl\fR [ \fIlibrary\fR ... ]
15 #include <sasl/sasl.h>
17 \fBint\fR \fBsasl_server_new\fR(\fBconst char *\fR\fIservice\fR, \fBconst char *\fR\fIserverFQDN\fR,
18 \fBconst char *\fR\fIuser_realm\fR, \fBconst char *\fR\fIiplocalport\fR,
19 \fBconst char *\fR\fIipremoteport\fR, \fBconst sasl_callback_t *\fR\fIcallbacks\fR,
20 \fBunsigned\fR \fIflags\fR, \fBsasl_conn_t **\fR\fIpconn\fR);
26 Use the \fBsasl_server_new()\fR interface to create a new SASL context. This
27 context will be used for all SASL calls for one connection. The new SASL
28 context handles both authentication and integrity or encryption layers after
37 The registered name of the service that uses SASL. The registered name is
38 usually the protocol name, for example, IMAP.
44 \fB\fIserverFQDN\fR\fR
47 The fully-qualified server domain name. If the value of \fIserverFQDN\fR is
48 \fINULL\fR, use \fBgethostname\fR(3C). The \fIserverFQDN\fR parameter is useful
49 for multi-homed servers.
55 \fB\fIuser_realm\fR\fR
58 The domain of the user agent. The \fIuser_realm\fR is usually not necessary.
59 The default value of \fIuser_realm\fR is \fINULL\fR.
65 \fB\fIiplocalport\fR\fR
70 The IP address and port of the local side of the connection. The value of
71 \fIiplocalport\fR may be \fINULL\fR. If \fIiplocalport\fR is \fINULL\fR,
72 mechanisms that require IP address information are disabled. The
73 \fIiplocalport\fR string must be in one of the following formats:
78 \fBa.b.c.d:port\fR (IPv4)
84 \fB[e:f:g:h:i:j:k:l]:port\fR (IPv6)
90 \fB[e:f:g:h:i:j:a.b.c.d]:port\fR (IPv6)
94 The following older formats are also supported:
99 \fBa.b.c.d;port\fR (IPv4)
105 \fBe:f:g:h:i:j:k:l;port\fR (IPv6)
111 \fBe:f:g:h:i:j:a.b.c.d;port\fR (IPv6)
118 \fB\fIipremoteport\fR\fR
121 The IP address and port of the remote side of the connection. The value of
122 \fIipremoteport\fR may be \fINULL\fR. See \fIiplocalport\fR.
128 \fB\fIcallbacks\fR\fR
131 Callbacks, for example: authorization, lang, and new getopt context.
140 Usage flags. For servers, the flags \fBSASL_NEED_PROXY\fR and
141 \fBSASL_SUCCESS_DATA\fR are available.
150 A pointer to the connection context allocated by the library. This structure
151 will be used for all future SASL calls for this connection.
157 \fBsasl_server_new()\fR returns an integer that corresponds to a SASL error
166 The call to \fBsasl_server_new()\fR was successful.
171 All other error codes indicate an error situation that must be handled, or the
172 authentication session should be quit. See \fBsasl_errors\fR(3SASL) for
173 information on SASL error codes.
177 See \fBattributes\fR(5) for descriptions of the following attributes:
185 ATTRIBUTE TYPE ATTRIBUTE VALUE
187 Interface Stability Evolving
195 \fBgethostname\fR(3C), \fBsasl_errors\fR(3SASL), \fBattributes\fR(5)