MEMCACHED_D...L_AUTH_DATA(3)
π MEMCACHED_D...L_AUTH_DATA(3) π
okay bestie, welcome to the libmemcached-awesome manual, third section, and yes the title is giving "the printer ran out of ink mid-word" but that's literally just how the name is, don't @ me π
β¨ NAME β¨
memcached_destroy_sasl_auth_data β libmemcached Documentation
πΈ SYNOPSIS πΈ
#include <libmemcached/memcached.h>
Compile and link with -lmemcached
void memcached_set_sasl_callbacks(memcached_st *ptr, const
sasl_callback_t *callbacks)
Parameters
ptrβ pointer to initializedmemcached_ststructcallbacksβ pointer tosasl_callbacks_tholding the callbacks to use
const sasl_callback_t *memcached_get_sasl_callbacks(memcached_st *ptr)
Parameters
ptrβ pointer to initializedmemcached_ststruct
Returns
pointer to sasl_callbacks_t holding the callbacks currently used
memcached_return_t memcached_set_sasl_auth_data(memcached_st *ptr, const
char *username, const char *password)
Parameters
ptrβ pointer to initializedmemcached_ststructusernameβ (yes bestie, it's justβ¦ blank in the original, I'm not hiding anything from you, that's literally all it says π)passwordβ (same situation, empty in the source, no cap)
Returns
memcached_return_t indicating success
memcached_return_t memcached_destroy_sasl_auth_data(memcached_st *ptr)
Parameters
ptrβ pointer to initializedmemcached_ststruct
Returns
memcached_return_t indicating success
π¦ DESCRIPTION π¦
libmemcached lets you plug in your very own callbacks function, the one libsasl uses to do SASL authentication. main character energy, honestly π
β οΈ heads up bestie β οΈ SASL requires the memcached binary protocol, and you have to specify the callbacks before you connect to the server. No sneaking them in after, periodt.
memcached_set_sasl_auth_data() is a lil helper function that defines the basic functionality for you β iconic, generous, we love her β but it will store the username and password in memory. If you go this route, you have to call memcached_destroy_sasl_auth_data() before calling memcached_free(), or you get a memory leak and that is not the vibe π
And listen: you should NOT callmemcached_destroy_sasl_auth_data()if you specify your own callback function withmemcached_set_sasl_callbacks(). Like, do not. Fr fr. π«Ά
β RETURN VALUE β
memcached_get_sasl_callbacks() returns the callbacks currently used by this memcached handle. memcached_set_sasl_auth_data() returns MEMCACHED_SUCCESS upon success. slay β¨
π SEE ALSO π
and that's the whole page, bestie β version 1.1, dated Jul 24, 2025, brought to you by libmemcached-awesome. go forth and authenticate responsibly πβ¨ππ¦πΈπ π
π¦ where this page comes from
- fedora 43: libmemcached-awesome-devel 1.1.4-7.fc43 Β· BSD-3-Clause
- fedora 43: libmemcached-awesome-devel 1.1.4-7.fc43 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms