SASL_LISTMECH(3)
β¨ SASL_LISTMECH β¨
okay bestie, gather round π this one lives in the Cyrus SASL manual, section 3, and it's genuinely so useful once it clicks. no cap.
πΈ NAME πΈ
sasl_listmech β the Cyrus SASL documentation, but make it a group chat explanation π
π¦ SYNOPSIS π¦
#include <sasl/sasl.h>
int sasl_listmech(sasl_conn_t *conn,
const char *user,
const char *prefix,
const char *sep,
const char *suffix,
const char **result,
unsigned *plen,
int *pcount);
π DESCRIPTION π
here's the whole signature again, laid out all pretty so your eyes don't have to work for it π
int sasl_listmech(sasl_conn_t *conn,
const char *user,
const char *prefix,
const char *sep,
const char *suffix,
const char **result,
unsigned *plen,
int *pcount);
so like. sasl_listmech hands you back a string that lists the SASL names of all the mechanisms available to the specified user. that's it, that's the whole vibe β¨
usually you'd hand that string off to the client through a capability command or an initial server response. and honestly? client applications need this list β how else are they supposed to know which mechanisms the server supports?? it's giving "here's the menu, pick your fave" π
π§ Parameters π§
connβ the SASL context for this connection. your whole situation, basically.userβ optional! if you pass one, it restricts the mechanism list to only those available to that user. narrowing the field, we love to see it.prefixβ appended to the beginning of the result. the little intro, the "hey bestie".sepβ appended between mechanisms. the lil comma moments between everyone.suffixβ appended to the end of the result. the mic drop, the outro.resultβ the NULL terminated result string. and listen β it's allocated/freed by the library, not by you. don't touch, don't free, don't be messy πplenβ length of the result, filled in by the library. may be NULL if you're not about that length life.pcountβ number of mechanisms available, filled in by the library. may be NULL too, no pressure.
π EXAMPLE π
sasl_listmech(conn,NULL,"(",",",")",&mechlist,NULL,NULL);
and this bad boy may give the following string as a result:
(ANONYMOUS,KERBEROS_V4,DIGESTβMD5)
look at those parentheses doing their prefix/suffix job, and those commas holding it down as the sep. iconic behavior, fr fr π
β RETURN VALUE β
SASL functions should return SASL return codes β go peek at sasl.h for the complete list. and SASL_OK indicates success. that's the one you want, bestie. that's the green flag π«Ά
π SEE ALSO π
RFC 4422,:saslman:sasl(3), sasl_server_new(3), sasl_errors(3), sasl_client_new(3)
π AUTHOR π
The Cyrus Team
π COPYRIGHT π
1993-2016, The Cyrus Team
and that's the whole page, no crumbs left π this was Cyrus SASL version 2.1.28, dated February 18, 2022 β go forth and list those mechanisms, you absolute main character π
π¦ 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