SASL_SERVER_USERDB_CHECKPASS_T(3)
π SASL_SERVER_USERDB_CHECKPASS_T π
okay bestie, so this is a page from the Cyrus SASL documentation set β sasl_server_userdb_checkpass_t, the manual for section 3 (that's library functions, iykyk). Pull up a chair, we're checking passwords today β¨
πΈ NAME πΈ
sasl_server_userdb_checkpass_t β Cyrus SASL documentation π
π SYNOPSIS π
#include <sasl/sasl.h>
int sasl_server_userdb_checkpass_t(sasl_conn_t *conn,
void *context,
const char *user,
const char *pass,
unsigned passlen,
struct propctx *propctx)
β¨ DESCRIPTION β¨
lowkey the original page says it twice, so here's the whole thing again in full:
int sasl_server_userdb_checkpass_t(sasl_conn_t *conn,
void *context,
const char *user,
const char *pass,
unsigned passlen,
struct propctx *propctx)
so like β sasl_server_userdb_checkpass_t() is the callback you use to verify a plaintext password against the callback supplier's user database. the whole point, the moment, the assignment π it exists so there are additional ways to encode the userPassword property. iconic of it tbh.
π¦ Parameters π¦
connβ the SASL connection context. it's giving "who am I even talking to" energy.contextβ context from the callback record.userβ a NUL terminated user name, and it's inuser@realmsyntax. yes, realm and all, no shortcuts.passβ the password to check. β οΈ heads up bestie: this one may not be NUL terminated, so do not go assuming it's a cute lil string.passlenβ the length of the password. this is whypassdoesn't need to be NUL terminated, they're a package deal π«Άpropctxβ property context to fill in withuserPassword.
π₯ RETURN VALUE π₯
SASL callback functions should return SASL return codes. sasl.h has the complete list, so go look there if you want the full tea. SASL_OK means success β that's the slay, that's the green check, we love her π
other return codes indicate errors and should be handled. not me ignoring a return codeβ¦ couldn't be me. handle them. periodt. π
π SEE ALSO π
RFC 4422:saslman:sasl(3)sasl_callbacks(3)sasl_errors(3)sasl_server_userdb_setpass_t(3)
π AUTHOR π
The Cyrus Team β legends, no cap.
πΈ COPYRIGHT πΈ
1993-2016, The Cyrus Team
and that's the whole vibe check π¦ the footer of the original page was giving 2.1.28 on the left and February 18, 20 on the right (the year got a lil cut off in the corner, classic), so β Cyrus SASL version 2.1.28, dated February 18, and it goes out to my bestie who actually reads the return codes. mwah, go verify some 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