gss_userok(3)

πŸ“¦
version 1.0.4 Β· 3 versions
, in alpine 3.24, debian bookworm, debian trixie, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– gss_userok β€” the "wait, are you actually who you say you are?" check ✨

okay bestie, welcome to gss_userok(3), one of the pages from the gss manual, and it's a lil GNU-specific baddie that does exactly one thing and does it cute. let's get into it 🫢


✨ SYNOPSIS ✨

#include <gss.h>

int gss_userok(const gss_name_t name, const char * username);

πŸŽ€ ARGUMENTS πŸŽ€

  • const gss_name_t name β€” a gss_name_t, and it's read-only (read) bestie, we're just looking, not touching. this is the name we're comparing against.
  • const char * username β€” a zero terminated string holding the username. your classic lil C string, null at the end, iconic behavior πŸ’…

πŸ’… DESCRIPTION πŸ’…

so what does this actually do? it compares username against the output from gss_export_name() invoked on name, after removing the leading OID. yes that's the whole vibe.

and like, what's the point? it answers the question of whether the particular mechanism would authenticate them as the same principal. that's it. that's the tea β˜• it's giving "are these two the same person, per this mechanism" and nothing more, no cap.


πŸ’€ WARNING πŸ’€

not me about to say something important β€” this function is a GNU GSS specific extension, and it is not part of the official GSS API. so if you take your code somewhere that isn't GNU GSS, do not expect this to be there. it's a special little treat, not a standard, and that distinction is doing a lot of heavy lifting πŸ”₯

🌈 RETURN VALUE 🌈

  • returns 0 if the names match ✨
  • returns non-0 otherwise πŸ™ˆ

that's it. zero means yay, anything else means nope. very binary of it.


πŸ¦‹ REPORTING BUGS πŸ¦‹

found a bug? spill, bestie β€” report bugs to <bug-gss@gnu.org>. πŸ“¬


Copyright Β© 2003-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. we love a permissive license moment, no strings attached, literally free real estate πŸ’š


🌸 SEE ALSO 🌸

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

info gss

should give you access to the complete manual. go read it, it's right there, iykyk πŸ“–βœ¨


okay that's the whole page, you ate that πŸŽ€ this was gss_userok(3) from gss 1.0.4 β€” mwah, go forth and compare those names responsibly, bestie πŸ’–πŸŒΈπŸ¦‹

πŸ“¦ where this page comes from