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)


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 πŸ§šβ€β™€οΈπŸŒΈ