gss_userok(3)
π 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β agss_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
0if 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>. π¬
- GNU Generic Security Service home page:
http://www.gnu.org/software/gss/ - General help using GNU software:
http://www.gnu.org/gethelp/
π COPYRIGHT π
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
- alpine 3.24: libgss-doc 1.0.4-r2 Β· ( LGPL-3.0-or-later OR GPL-2.0-or-later ) AND GPL-3.0-or-later
- debian bookworm: gss-man 1.0.4-1+deb12u2 Β· GPL-3.0-or-later
- debian trixie: gss-man 1.0.4-4 Β· GPL-3.0-or-later
- ubuntu noble: gss-man 1.0.4-1build2 Β· GPL-3.0-or-later
- ubuntu questing: gss-man 1.0.4-4
- ubuntu resolute: gss-man 1.0.4-4build1 Β· GPL-3.0-or-later
- ubuntu stonking: gss-man 1.0.4-5 Β· 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