AUTH_GETOPTION(3)
β¨ AUTH_GETOPTION(3) β¨
okay bestie, welcome to section 3 of the manual (iykyk, that's the library-functions girlies) π
this one's called auth_getoption and she's a lil cutie from the authlib cinematic universe. buckle uppp π
πΈ NAME πΈ
auth_getoption β search an option string, bestie. that's it. that's the whole job. π
π¦ SYNOPSIS π¦
#include <courierauth.h>
char *value=auth_getoption(const char *options, const char *keyword);
like. look at her. two args, one return, no notes. π
β¨ DESCRIPTION β¨
so basically, this is your lil convenience function for parsing account options β the ones that show up in the callback function that gets invoked by auth_generic_meta(3), auth_login_meta(3), auth_getuserinfo_meta(3), and auth_passwd(3). she's the friend who reads the group chat for you and tells you what's actually going on. π«Ά
optionsβ this is the options field fromauthinfo, and yes, she can beNULL. no shame in that. as described over inauth_generic_meta(3)(and the others too, they all say the same thing), it's a comma-separated list of<italic>keyword=value</italic>pairs. commas are the vibe separators. periodt.keywordβ the keyword you're hunting for.
auth_getoption searches options for a keyword. that's the whole plot. she looks. she finds (or doesn't). iconic behaviour honestly. π
π RETURNS π
okay here's the tea, and it's important so listen:
- if
optionsdoes not have thekeyword,auth_getoptionreturnsNULLand setserrnotoENOENT. she's not being dramatic, that's just the API. π - otherwise,
auth_getoptionallocates a buffer forvalueand returns it. and guess what β it is the caller's responsibility tofree(3)the returned buffer. no cap. you took the buffer home, you feed it. if you leak it, that's on you bestie π auth_getoptionreturnsNULLwitherrnoset toENOMEMif it cannot allocate a buffer. the malloc said no and honestly? relatable. π₯²
π SEE ALSO π
π NOTES π
auth_generic_meta(3)β https://www.courier-mta.org/authlib/auth_generic.htmlauth_login_meta(3)β https://www.courier-mta.org/authlib/auth_login.htmlauth_getuserinfo_meta(3)β https://www.courier-mta.org/authlib/auth_getuserinfo.htmlauth_passwd(3)β https://www.courier-mta.org/authlib/auth_passwd.htmlauthlib(3)β https://www.courier-mta.org/authlib/authlib.html
and that's the whole page, bestie! this absolute banger of a manpage was written by S. Varshavchik. and dated 01/11/2026 β yes we're serving you the freshest vintage π go forth and parse those option strings, you're doing amazing sweetie π¦β¨π
π¦ where this page comes from
- ubuntu stonking: courier-authlib-dev 0.73.1-2ubuntu1 Β· GPL-3+~with-OpenSSL-exception
- Copyright 2004 S. Varshavchik. See COPYING for -->
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms