SASL_SERVER_NEW(3)
β¨ sasl_server_new β¨
okay bestie, gather round, because we're talking about sasl_server_new from the Cyrus SASL manual β page 3, section 3, the whole vibe π
πΈ NAME πΈ
sasl_server_new β Cyrus SASL documentation. that's it, that's the name, she's iconic and she knows it π
π SYNOPSIS π
#include <sasl/sasl.h>
int sasl_server_new(const char *service,
const char *serverFQDN,
const char *user_realm,
const char *iplocalport,
const char *ipremoteport,
const sasl_callback_t *callbacks,
unsigned flags,
sasl_conn_t ** pconn);
π DESCRIPTION π
here's the whole signature again so your eyes can vibe with it:
int sasl_server_new(const char *service,
const char *serverFQDN,
const char *user_realm,
const char *iplocalport,
const char *ipremoteport,
const sasl_callback_t *callbacks,
unsigned flags,
sasl_conn_t ** pconn);
so sasl_server_new() creates a brand new SASL context β¨ and this context? she's the main character for all SASL calls for one connection. not some of them. all of them. and she handles both authentication and the integrity/encryption layers after authentication. multitasking queen π«Ά
π Parameters π
serviceβ the registered name of the service using SASL, usually the protocol name (e.g."imap"). it's giving "hi, this is who I am" πβοΈserverFQDNβ the fully qualified server domain name. if it'sNULL, it means usegethostname(). super useful for multi-homed servers, no cap.user_realmβ the domain of the user agent. usually you don't need this at all (NULLis the default) πiplocalportβ the IP and port of the local side of the connection, orNULL. ifiplocalportisNULLit will disable mechanisms that require IP address information. these strings must be in one of the following formats:"a.b.c.d;port"(IPv4),"e:f:g:h:i:j:k:l;port"(IPv6), or"e:f:g:h:i:j:a.b.c.d;port"(IPv6)
ipremoteportβ the IP and port of the remote side of the connection, orNULL(seeiplocalportabove, same rules apply bestie) π₯flagsβ connection flags (peep the section below π)pconnβ a pointer to the connection context that the library allocates. this structure is gonna be used for all future SASL calls for this connection. she's in it for the long haul π
π¦ Connection flags π¦
flags that may be passed to sasl_server_new():
SASL_SUCCESS_DATAβ the protocol supports a server-last send β¨SASL_NEED_PROXYβ force the use of a mechanism that supports an authorization id that is not the authentication id π
β RETURN VALUE β
SASL callback functions should return SASL return codes. see sasl.h for a complete list, fr fr. SASL_OK indicates success π
other return codes indicate errors and should either be handled, or the authentication session should be quit. like, no negotiating on this one π
okay so real talk: if you get something that isn't SASL_OK, handle it or bail. don't just ignore it and hope for the best, that's not the vibe.
π SEE ALSO π
RFC 4422,:saslman:sasl(3), sasl_server_init(3), sasl_server_start(3), sasl_server_step(3), sasl_setprop(3), sasl_errors(3)
the whole girl gang, go read them π«Ά
π AUTHOR π
The Cyrus Team. legends only.
π COPYRIGHT π
1993-2016, The Cyrus Team
and that's the tea bestie π this page is from Cyrus SASL version 2.1.28, dated February 18, 2022 β mwah, historic, iconic, obsessed πβ¨π¦
π¦ where this page comes from
- alpine 3.22: cyrus-sasl-doc 2.1.28-r8 Β· BSD-3-Clause-Attribution AND BSD-4-Clause
- alpine 3.23: cyrus-sasl-doc 2.1.28-r9 Β· BSD-3-Clause-Attribution AND BSD-4-Clause
- alpine 3.24: cyrus-sasl-doc 2.1.28-r9 Β· BSD-3-Clause-Attribution AND BSD-4-Clause
- centos-stream 10: cyrus-sasl-devel 2.1.28-27.el10 Β· BSD-Attribution-HPND-disclaimer
- fedora 43: cyrus-sasl-devel 2.1.28-33.fc43 Β· BSD-Attribution-HPND-disclaimer
- fedora 43: cyrus-sasl-devel 2.1.28-33.fc43 Β· BSD-Attribution-HPND-disclaimer
- fedora 44: cyrus-sasl-devel 2.1.28-35.fc44 Β· BSD-Attribution-HPND-disclaimer
- fedora 44: cyrus-sasl-devel 2.1.28-35.fc44 Β· BSD-Attribution-HPND-disclaimer
- opensuse-leap 16.0: cyrus-sasl-bdb-devel 2.1.28-160000.4.1 Β· BSD-4-Clause
- opensuse-leap 16.0: cyrus-sasl-bdb-devel 2.1.28-160000.4.1 Β· BSD-4-Clause
- opensuse-leap 16.0: cyrus-sasl-bdb-devel 2.1.28-160000.4.1 Β· BSD-4-Clause
- opensuse-leap 16.0: cyrus-sasl-bdb-devel 2.1.28-160000.4.1 Β· BSD-4-Clause
- opensuse-leap 16.0: cyrus-sasl-devel 2.1.28-160000.4.1 Β· BSD-4-Clause
- opensuse-leap 16.0: cyrus-sasl-devel 2.1.28-160000.4.1 Β· BSD-4-Clause
- opensuse-leap 16.0: cyrus-sasl-devel 2.1.28-160000.4.1 Β· BSD-4-Clause
- opensuse-leap 16.0: cyrus-sasl-devel 2.1.28-160000.4.1 Β· BSD-4-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms