shishi_encprivpart_user_data(3)
π shishi_encprivpart_user_data β a whole API function, bestie β¨
shishi manual, section 3 (that's the library-call girlies π«Ά). Okay so listen, this one is genuinely useful and also very "why is memory management like this" energy, so let's get into it.
πΈ NAME πΈ
shishi_encprivpart_user_data β it's an API function, babes. That's the whole name. Iconic of it to be that straightforward. π
π SYNOPSIS π
#include <shishi.h>
int shishi_encprivpart_user_data(Shishi * handle, Shishi_asn1
encprivpart, char ** userdata, size_t * userdatalen);
Look at her. Four parameters, one int return, zero chill. π
π¦ ARGUMENTS π¦
Shishi * handleβ the shishi handle, and you gotta get it the way you're supposed to: as allocated byshishi_init(). No freelancing. πShishi_asn1 encprivpartβ theencprivpart, and bestie it has to come fromshishi_priv(). That's the vibe check: if it wasn't allocated byshishi_priv(), we are not doing this. πchar ** userdataβ output array with the newly allocated user data from KRB-PRIV. Yes, newly allocated, we'll get to that. πsize_t * userdatalenβ output size of the output user data buffer. She's telling you how big the thing is. π
β¨ DESCRIPTION β¨
So the actual assignment here: read the user data value from KRB-PRIV. That's it, that's the job. π
Now here's the part you cannot skim, and I'm saying this with love:
userdata is allocated by this function, and it is the responsibility of the caller to deallocate it.
Not me handing you a freshly allocated buffer and then walking away like a main character. That's literally the deal though. She mallocs, you free. Teamwork. π€
β RETURN VALUE β
Returns SHISHI_OK iff successful. Iff, bestie. Iff. That's the fancy math-girl "if and only if." Anything else and something went sideways. π
π₯ REPORTING BUGS π₯
Found a bug? First of all, valid. Report it to <bug-shishi@gnu.org>.
- GNU Shishi home page:
http://www.gnu.org/software/shishi/ - General help using GNU software:
http://www.gnu.org/gethelp/
Go off, tell them everything. They want to know. π«Ά
π COPYRIGHT π
Copyright Β© 2002-2022 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. (Translation: take it, share it, just keep the receipts attached. Respect the author, periodt. πΈ)
π SEE ALSO π
The full documentation for shishi is maintained as a Texinfo manual. If the info and shishi programs are properly installed at your site, the command
info shishi
should give you access to the complete manual. Go read the whole thing, it's giving comprehensive. πβ¨
And that's the page, babe β from the shishi squad, version 1.0.3, dated with the shishi_encprivpart_user_data(3) energy we all know and love. Now go free that userdata buffer before I find out you didn't. π
ππ¦
π¦ where this page comes from
- debian bookworm: shishi-doc 1.0.3-1 Β· GPL-3.0-or-later
- debian trixie: shishi-doc 1.0.3-5 Β· GPL-3.0-or-later
- nixos 26.05: shishi 1.0.3
- nixpkgs unstable: shishi 1.0.3
- ubuntu noble: shishi-doc 1.0.3-2.1build2 Β· GPL-3.0-or-later
- ubuntu questing: shishi-doc 1.0.3-5
- ubuntu resolute: shishi-doc 1.0.3-5build1 Β· GPL-3.0-or-later
- ubuntu stonking: shishi-doc 1.0.3-7 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms