gsasl_server_callback_gssapi_set(3)
π NAME π
gsasl_server_callback_gssapi_set β bestie, it's an API function π
No cap, that's literally the whole name. It's the little setter that tells your server who's allowed in when GSSAPI is doing its thing. β¨
πΈ SYNOPSIS πΈ
#include <gsasl.h>
void gsasl_server_callback_gssapi_set(Gsasl * ctx,
Gssasl_server_callback_gssapi cb);
okay wait, let me redo that, my brain typed a whole extra letter, embarrassing π the real one is:
#include <gsasl.h>
void gsasl_server_callback_gssapi_set(Gsasl * ctx,
Gsasl_server_callback_gssapi cb);
she returns void, she takes two things, she's lowkey simple and I respect that π«Ά
π¦ ARGUMENTS π¦
Gsasl * ctxβ the libgsasl handle. your main character context object, the whole vibe lives in here πGsasl_server_callback_gssapi cbβ the callback function itself. yes, you're passing a function to a function. very meta of you. iconic β¨
π DESCRIPTION π
okay so here's the tea π
You're running a server. Someone rolls up with GSSAPI credentials and a username, and now you gotta answer the big question: is this user actually authorized for that username? Not just "did they authenticate", bestie β authorized. Different thing. π
So you call gsasl_server_callback_gssapi_set and you hand it a callback function. That function is your bouncer. It gets to decide. And apparently a very normal thing to do inside it is call krb5_kuserok β that's the vibe the docs are pointing at. π§
Now the contract, and this part matters, don't skip it π:
- Your callback should return
GSASL_OKif the user should be permitted access β - Otherwise return an error code, like
GSASL_AUTHENTICATION_ERROR, when it fails β
And if you ever lose track of which callback you set? You can pull it back out later with gsasl_server_callback_gssapi_get(). The getter exists. Balance. π
π DEPRECATED π
ma'am. MA'AM. this is the old callback interface. π¨
Like, it still works, nobody's coming for you, but it's giving legacy. The new interface does it like this:
- use
gsasl_callback_set()to set the application callback - then use
gsasl_callback()orgsasl_property_get()to invoke that callback for certain properties
That's the glow-up. Same energy, new outfit. If you're writing fresh code, go be a new-interface girlie. π
π REPORTING BUGS π
Found a bug? Not you being the bug detective π β 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 over at: http://www.gnu.org/software/gsasl/
π COPYRIGHT π
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.
(that's the license, and it's very generous of them, we love that for us π«Ά)
β 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, the command
info gsasl
should give you access to the complete manual. As an alternative you may obtain the manual from:
http://www.gnu.org/software/gsasl/manual/
that's it bestie, that's the page π
go set your callback, return GSASL_OK when they're allowed, and remember the old interface is deprecated so don't @ me when the new one is right there β¨
gsasl 1.10.0 β gsasl_server_callback_gssapi_set(3), mwah, sending you the biggest hug from the manpage section of the group chat πππ¦
π¦ where this page comes from
- ubuntu jammy: libgsasl-dev 1.10.0-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