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 in user@realm syntax. 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 why pass doesn't need to be NUL terminated, they're a package deal 🫢
  • propctx β€” property context to fill in with userPassword.

πŸ”₯ 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 πŸ‘‘


πŸ’œ AUTHOR πŸ’œ

The Cyrus Team β€” legends, no cap.


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 πŸ’–πŸŽ€βœ¨