SASL_SERVER_USERDB_SETPASS_T(3)
π NAME π
sasl_server_userdb_setpass_t β Cyrus SASL documentation, bestie edition π«Ά
okay so welcome to the Cyrus SASL cinematic universe, section 3 of the manual pages, and today's main character is sasl_server_userdb_setpass_t. yes she's a callback. yes she's iconic. let's get into it β¨
πΈ SYNOPSIS πΈ
#include <sasl/sasl.h>
int sasl_server_userdb_setpass_t(sasl_conn_t *conn,
void *context,
const char *user,
const char *pass,
unsigned passlen,
struct propctx *propctx,
unsigned flags)
π DESCRIPTION π
int sasl_server_userdb_setpass_t(sasl_conn_t *conn,
void *context,
const char *user,
const char *pass,
unsigned passlen,
struct propctx *propctx,
unsigned flags)
so basically? sasl_server_userdb_setpass_t is the callback that stores or changes a plaintext password in the user database of whoever supplied the callback. like she's the one actually writing the new password down. no cap π
the parameters (aka the squad) π
connβ the SASL connection, obviously. she's always there.contextβ the context that came from the callback record. it's giving "carried over from last time."userβ NUL terminated user name, and it's inuser@realmsyntax. don't forget the realm bestie, the realm matters π¦passβ the password to check, and lowkey important: it may not be NUL terminated. so like. do not assume. π«passlenβ the length of the password. this is whypassdoesn't need to be NUL terminated. they go together, periodt.propctxβ Auxilliary Properties, and heads up: they are not stored. just passing through πflagsβ these are literally the same flags that get passed tosasl_setpass(3), and they're documented over on that man page. so if you're confused about flags, that's a you-and-sasl_setpass(3)conversation π
β RETURN VALUE β
SASL callback functions should return SASL return codes. the full list lives in sasl.h, go look, it's right there π
SASL_OK means success. that's the slay. that's the win. π
any other return code means there's an error, and bestie, those should be handled. do not ignore them. that's not the vibe. π
π₯ SEE ALSO π₯
RFC 4422:saslman:sasl(3)sasl_errors(3)sasl_callbacks(3)sasl_server_userdb_checkpass_t(3)sasl_setpass(3)
π AUTHOR π
The Cyrus Team. legends only, fr fr π
π COPYRIGHT π
1993-2016, The Cyrus Team
and that's the whole page!! thanks for coming to my TED talk, this was Cyrus SASL manual page 2.1.28, dated February 18, 2022 β mwah, go handle your return codes, ily, bye π§β¨π
π¦ 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