SASL_CHECKPASS(3)
π SASL_CHECKPASS(3) β the Cyrus SASL manual page, bestie edition π
ok so you're in the Cyrus SASL manual section 3 (that's the library-functions girlies π
) and today's main character is sasl_checkpass. let's get into it.
β¨ NAME β¨
sasl_checkpass β Cyrus SASL documentation π (yes bestie, that's literally what the NAME section says, we're not doing false advertising here)
πΈ SYNOPSIS πΈ
#include <sasl/sasl.h>
int sasl_checkpass(sasl_conn_t *conn,
const char *user,
unsigned userlen,
const char *pass,
unsigned passlen);
π¦ DESCRIPTION π¦
lowkey the original manpage just restates the signature here, so here it is again, exactly as written, no crumbs left behind:
int sasl_checkpass(sasl_conn_t *conn,
const char *user,
unsigned userlen,
const char *pass,
unsigned passlen)
ok so what does it actually do? sasl_checkpass will check a plaintext password. it's giving "the bouncer at the door checking IDs" energy. π₯
and the way that you genuinely need this: it's required for protocols that had a login method before SASL existed (for example the LOGIN command in IMAP). like, those old-school protocols were already doing their thing and SASL is the glow-up that came later. π
the password gets checked with the pwcheck_method. and if you wanna know how that parameter gets set, go read sasl_callbacks(3) β it's all in there, iykyk. β¨
β RETURN VALUE β
sasl_checkpass returns an integer, and that integer corresponds to one of the codes listed in this section (the manpage is like "one of the following codes", and honestly bestie, same vibe).
SASL_OKβ this is the good one π it indicates that the authentication is complete. slay. we ate. π- everything else β all other return codes indicate errors π and you should either handle them or just quit the authentication session entirely. no cap, don't sit there pretending everything's fine.
for the meanings of the return codes, go check sasl_errors(3). fr fr. π«Ά
π CONFORMING TO π
RFC 4422 β yes she conforms, she's certified, she's iconic. β
π SEE ALSO π
the whole friend group, together at last π«β¨
π AUTHOR π
The Cyrus Team π (absolute legends, no notes)
π COPYRIGHT π
1993-2016, The Cyrus Team β that's a long-running era right there, we love longevity π°οΈβ¨
and that's the whole page bestie!! this one's from version 2.1.28, dated February 18, 2022, and the source is the one and only Cyrus SASL. mwah π go forth and check those passwords responsibly π§ββοΈπΈ
π¦ 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