gsasl_md5pwd_get_password(3)

πŸ“¦ version 1.10.0, in ubuntu jammy

πŸ’– gsasl_md5pwd_get_password β€” the manual page, but make it make sense πŸ’–

okay bestie, welcome to the gsasl manual (that's the GNU SASL crew, and yes this whole page lives in section 3 of the manual, so it's a library function, not a command you just yeet into your shell 🫢).


✨ NAME ✨

gsasl_md5pwd_get_password β€” it's an API function, babes. That's the whole vibe.


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <gsasl.h>

int gsasl_md5pwd_get_password(const char * filename, const char *
username, char * key, size_t * keylen);

like, look at that signature. she's serving. πŸ’…


🌸 ARGUMENTS 🌸

  • const char * filename β€” the filename of the file that's holding your passwords. yes, that file. πŸ™ˆ
  • const char * username β€” the username string. you know, the person you're looking up.
  • char * key β€” the output character array. this is where the password lands, bestie.
  • size_t * keylen β€” on the way in, this is the max size of that output array. on the way out, it's been updated to the actual length of the output array. so it's giving input and output, main character energy ⭐

πŸ‘‘ DESCRIPTION πŸ‘‘

so basically: this function retrieves the password for a user from a specified file. simple as.

and here's the lil trick β€” to find out how big your output array needs to be, you call this function with out=NULL. that's the move. ✨

the file itself should be in the UoW "MD5 Based Authentication" format. what does that mean? it's text format, with comments denoted by # first on the line, and user entries looking like this:

usernameTABpassword

before it does anything, this function removes CR and LF at the end of lines before processing. and just so we're all clear, TAB, CR, and LF denote ASCII values 9, 13, and 10, respectively. no cap.

Return value: it returns GSASL_OK if the output buffer contains the password πŸŽ‰, GSASL_AUTHENTICATION_ERROR if the user could not be found 😭, or some other error code.


πŸ’€ DEPRECATED πŸ’€

girl. use gsasl_simple_getpass() instead. this one's old news. the way that this function is deprecated is genuinely so sad but we move on πŸ’…

πŸ› REPORTING BUGS πŸ›

found a bug? don't gatekeep, report it to <bug-gsasl@gnu.org>.

general guidelines for reporting bugs live here: http://www.gnu.org/gethelp/

and the GNU SASL home page is right here: http://www.gnu.org/software/gsasl/ 🌈


Copyright Β© 2002-2021 Simon Josefsson.

copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. so like, keep the receipts, bestie 🧚


πŸ”₯ SEE ALSO πŸ”₯

the full documentation for gsasl is maintained as a Texinfo manual. if the info and gsasl programs are properly installed at your site, this command:

info gsasl

should give you access to the complete manual. obsessed. πŸ‘‘

as an alternative, you may obtain the manual from:

http://www.gnu.org/software/gsasl/manual/

and that's the whole page, no crumbs left. this was the gsasl manual, version 1.10.0, for gsasl_md5pwd_get_password(3) β€” tysm for reading, go call gsasl_simple_getpass() instead tho fr fr πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from