krb5_error(3)
krb5_error(3) π straight outta the Heimdal Kerberos 5 library β¨
π NAME π
krb5_error β the Heimdal Kerberos 5 error reporting functions π
like, the whole squad of them. she reports errors. that's the vibe. π¦
πΈ SYNOPSIS πΈ
β¨ Functions β¨
okay bestie, here's the full lineup, no skips, no cuts π
krb5_get_error_stringβ grabs you achar *. Deprecated, bestie, I'm so serious β the note literally saysUse krb5_get_error_message instead. do not be out here using the old one. π
KRB5_LIB_FUNCTION char *KRB5_LIB_CALL krb5_get_error_string
(krb5_context context) KRB5_DEPRECATED_FUNCTION('Use
krb5_get_error_message instead')
krb5_eai_to_heim_errnoβ takes anint eai_errnoand anint system_error, hands you back akrb5_error_code. two ints in, one error code out. balanced. π
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_eai_to_heim_errno
(int eai_errno, int system_error)
krb5_h_errno_to_heim_errnoβ oneint eai_errnogoes in, akrb5_error_codecomes out. (yes the param is namedeai_errno, no I did not mistype it, that's literally what the page says, slay π )
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
krb5_h_errno_to_heim_errno (int eai_errno)
krb5_clear_error_messageβ returnsvoid, takes thekrb5_context. the little eraser of the group π§½β¨
KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_clear_error_message
(krb5_context context)
krb5_set_error_messageβvoid, takescontext, akrb5_error_code ret, and aconst char *fmt,.... she's a variadic girlie,__printf__-style formatting and all. π
KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_set_error_message
(krb5_context context, krb5_error_code ret, const char *fmt,...)
__attribute__((__format__(__printf__
krb5_vset_error_messageβ same energy as the one above but the...is now ava_list args. thevstands for very demure, very mindful, veryva_list. π
KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_vset_error_message
(krb5_context context, krb5_error_code ret, const char *fmt, va_list
args) __attribute__((__format__(__printf__
krb5_prepend_error_messageβvoid, takescontext,ret, and the variadicfmt,.... she's the "put it at the FRONT" sister ofkrb5_set_error_message. π
KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_prepend_error_message
(krb5_context context, krb5_error_code ret, const char *fmt,...)
__attribute__((__format__(__printf__
krb5_vprepend_error_messageβ theva_list argsversion of the prepend girlie. twin flame behaviour. π«Ά
KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_vprepend_error_message
(krb5_context context, krb5_error_code ret, const char *fmt, va_list
args) __attribute__((__format__(__printf__
krb5_get_error_messageβ takescontextand akrb5_error_code code, gives you back aconst char *. this is the non-deprecated icon the other one told you to use. main character energy fr fr β¨
KRB5_LIB_FUNCTION const char *KRB5_LIB_CALL krb5_get_error_message
(krb5_context context, krb5_error_code code)
krb5_free_error_messageβvoid, takescontextand theconst char *msg. you got a message, now let it go. closure is healthy. π¦
KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_free_error_message
(krb5_context context, const char *msg)
krb5_vwarnβ returns akrb5_error_code, takescontext,code,fmt, andva_list ap, all__printf__formatted. warning but make it variadic-args style. π
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_vwarn (krb5_context
context, krb5_error_code code, const char *fmt, va_list ap)
__attribute__((__format__(__printf__
krb5_warnβkrb5_error_codeback, takescontext,code, and the variadicfmt,.... and yes, the declaration in the source is doubled up βKRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALLappears twice, that's not me glitching, that's the page. iconic in a cursed way π
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL KRB5_LIB_FUNCTION
krb5_error_code KRB5_LIB_CALL krb5_warn (krb5_context context,
krb5_error_code code, const char *fmt,...)
__attribute__((__format__(__printf__
krb5_vwarnxβkrb5_error_code, takescontext,fmt, andva_list ap. notice: nocodeparam. she's the x-variant. the x is silent but powerful. π
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_vwarnx
(krb5_context context, const char *fmt, va_list ap)
__attribute__((__format__(__printf__
krb5_warnxβkrb5_error_code,context+ variadicfmt,.... and yes bestie, doubled macros again. two of them. living their truth. π
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL KRB5_LIB_FUNCTION
krb5_error_code KRB5_LIB_CALL krb5_warnx (krb5_context context,
const char *fmt,...) __attribute__((__format__(__printf__
krb5_verrβkrb5_error_code, takescontext,int eval,code,fmt, andva_list ap. and she's marked__noreturn__. she does NOT come back. periodt. π€
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_verr (krb5_context
context, int eval, krb5_error_code code, const char *fmt, va_list
ap) __attribute__((__noreturn__
krb5_errβkrb5_error_code,context,int eval,code, variadicfmt,.... also__noreturn__. she's leaving and she's not texting back. π₯
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_err (krb5_context
context, int eval, krb5_error_code code, const char *fmt,...)
__attribute__((__noreturn__
krb5_verrxβkrb5_error_code,context,int eval,fmt,va_list ap. nocodeparam, x-variant,__noreturn__. mysterious, dramatic, gone. π
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_verrx (krb5_context
context, int eval, const char *fmt, va_list ap)
__attribute__((__noreturn__
krb5_errxβkrb5_error_code,context,int eval, variadicfmt,...,__noreturn__. the last of the__noreturn__quadruplets. we stan a consistent queen. π
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_errx (krb5_context
context, int eval, const char *fmt,...) __attribute__((__noreturn__
krb5_vabortβkrb5_error_code,context,code,fmt,va_list ap,__noreturn__. yes, abort. she is NOT asking for permission. π
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_vabort
(krb5_context context, krb5_error_code code, const char *fmt,
va_list ap) __attribute__((__noreturn__
krb5_abortβkrb5_error_code,context,code, variadicfmt,...,__noreturn__. same energy,...instead ofva_list. πΈ
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_abort (krb5_context
context, krb5_error_code code, const char *fmt,...)
__attribute__((__noreturn__
krb5_abortxβkrb5_error_code,context, variadicfmt,...,__noreturn__. nocodeparam. she aborts bare. π
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_abortx
(krb5_context context, const char *fmt,...)
__attribute__((__noreturn__
krb5_set_warn_destβkrb5_error_code, takescontextand akrb5_log_facility *fac. pointer girlie. β¨
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_set_warn_dest
(krb5_context context, krb5_log_facility *fac)
krb5_get_warn_destβ hands you back akrb5_log_facility *, takes just thecontext. and the star hugs the return type here:krb5_log_facility *KRB5_LIB_CALL. respect the formatting, bestie. π
KRB5_LIB_FUNCTION krb5_log_facility *KRB5_LIB_CALL krb5_get_warn_dest
(krb5_context context)
π₯ Detailed Description π₯
okay so this is where the actual tea gets spilledβ¦ and it's coming up in part 2, so hold on, we're not done here π
β¨ Function Documentation β¨
π krb5_abort
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_abort (krb5_context context, krb5_error_code code, const char * fmt, ...)
Okay so bestie, this one is dramatic. It logs a warning to the log (which defaults to stderr), includes the error from the last failure, and then aborts. Like, it's not even sorry. π
Parameters:
contextβ a Kerberos 5 context, obviously.codeβ the error code of the last error.fmtβ the message to print....β arguments for the format string.
π₯ krb5_abortx
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_abortx (krb5_context context, const char * fmt, ...)
Same energy as krb5_abort but it doesn't include the last error. It just logs a warning (default stderr) and then aborts. No cap. π
Parameters:
contextβ a Kerberos 5 context.fmtβ printf format string of message to print....β arguments for the format string.
π§Ή krb5_clear_error_message
KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_clear_error_message (krb5_context context)
Clears the error message from the Kerberos 5 context. Like a little reset button for your error string. β¨
Parameters:
contextβ the Kerberos 5 context to clear.
π krb5_eai_to_heim_errno
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_eai_to_heim_errno (int eai_errno, int system_error)
Converts the getaddrinfo() error code to a Kerberos et error code. So you can translate that networking drama into Kerberos language. π
Parameters:
eai_errnoβ contains the error code fromgetaddrinfo().system_errorβ should have the value oferrnoafter the failedgetaddrinfo().
Returns:
- Kerberos error code representing the EAI errors.
πͺ krb5_err
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_err (krb5_context context, int eval, krb5_error_code code, const char * fmt, ...)
Logs a warning to the log (default stderr), includes the error from the last failure, and then exits. It's giving "I'm done here". πͺπ¨
Parameters:
contextβ a Kerberos 5 context.evalβ the exit code to exit with.codeβ error code of the last error.fmtβ message to print.
πͺ krb5_errx
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_errx (krb5_context context, int eval, const char * fmt, ...)
Like krb5_err but without the last error. Logs a warning (default stderr) and then exits. Simple. π
Parameters:
contextβ a Kerberos 5 context.evalβ the exit code to exit with.fmtβ message to print.
ποΈ krb5_free_error_message
KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_free_error_message (krb5_context context, const char * msg)
Frees the error message returned by krb5_get_error_message(). Don't forget to free your strings, bestie, or it's a leak. π§
Parameters:
contextβ Kerberos context.msgβ error message to free, returned bykrb5_get_error_message().
π¬ krb5_get_error_message
KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL krb5_get_error_message (krb5_context context, krb5_error_code code)
Returns the error message for code in context. On memory allocation error, the function returns NULL. So you might get a cute string or a big fat NULL. π
Parameters:
contextβ Kerberos 5 context.codeβ error code related to the error.
Returns:
- an error string, needs to be freed with
krb5_free_error_message(). The functions returnNULLon error.
π¬ krb5_get_error_string
KRB5_LIB_FUNCTION char* KRB5_LIB_CALL krb5_get_error_string (krb5_context context)
Returns the error message in context. On error or no error string, the function returns NULL. So if there's no tea, you get NULL. π«
Parameters:
contextβ Kerberos 5 context.
Returns:
- an error string, needs to be freed with
krb5_free_error_message(). The functions returnNULLon error.
π krb5_get_warn_dest
KRB5_LIB_FUNCTION krb5_log_facility* KRB5_LIB_CALL krb5_get_warn_dest (krb5_context context)
Gets the default logging facility. Like, where do the warnings go? Now you know. π
Parameters:
contextβ a Kerberos 5 context.
π krb5_h_errno_to_heim_errno
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_h_errno_to_heim_errno (int eai_errno)
Converts the gethostname() error code (h_error) to a Kerberos et error code. Another translator, because we love interoperability. π
Parameters:
eai_errnoβ contains the error code fromgethostname().
Returns:
- Kerberos error code representing the
gethostnameerrors.
π krb5_prepend_error_message
KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_prepend_error_message (krb5_context context, krb5_error_code ret, const char * fmt, ...)
Prepends the context's full error string for a specific error code. The error that is stored should be internationalized. If context is NULL, no error string is stored. So it's like adding a little prefix to your error saga. π
Parameters:
contextβ Kerberos 5 context.retβ the error code.fmtβ error string for the error code....βprintf(3)style parameters.
π krb5_set_error_message
KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_set_error_message (krb5_context context, krb5_error_code ret, const char * fmt, ...)
Sets the context's full error string for a specific error code. The error that is stored should be internationalized. If context is NULL, no error string is stored. So you're replacing the error message entirely. Iconic. β¨
Parameters:
contextβ Kerberos 5 context.retβ the error code.fmtβ error string for the error code....βprintf(3)style parameters.
π krb5_set_warn_dest
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_set_warn_dest (krb5_context context, krb5_log_facility * fac)
Sets the default logging facility. So you can redirect where the warnings go. Slay. π
Parameters:
contextβ a Kerberos 5 context.facβ facility to use for logging.
π krb5_vabort
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_vabort (krb5_context context, krb5_error_code code, const char * fmt, va_list ap)
Like krb5_abort but takes a va_list. Logs a warning (default stderr), includes the error from the last failure, and then aborts. Still dramatic. π
Parameters:
contextβ a Kerberos 5 context.codeβ error code of the last error.fmtβ message to print.apβ arguments.
πͺ krb5_verr
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_verr (krb5_context context, int eval, krb5_error_code code, const char * fmt, va_list ap)
Like krb5_err but with a va_list. Logs a warning (default stderr), includes the last error, and then exits. πͺ
Parameters:
contextβ a Kerberos 5 context.evalβ the exit code to exit with.codeβ error code of the last error.fmtβ message to print.apβ arguments.
πͺ krb5_verrx
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_verrx (krb5_context context, int eval, const char * fmt, va_list ap)
Like krb5_errx but with a va_list. Logs a warning (default stderr) and then exits. No last error included. π
Parameters:
contextβ a Kerberos 5 context.evalβ the exit code to exit with.fmtβ message to print.apβ arguments.
π krb5_vprepend_error_message
KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_vprepend_error_message (krb5_context context, krb5_error_code ret, const char * fmt, va_list args)
Prepends the context's full error string for a specific error code. If context is NULL, no error string is stored. This is the va_list version. π
Parameters:
contextβ Kerberos 5 context.retβ the error code.fmtβ error string for the error code.argsβprintf(3)style parameters.
π krb5_vset_error_message
KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_vset_error_message (krb5_context context, krb5_error_code ret, const char * fmt, va_list args)
Sets the context's full error string for a specific error code. If context is NULL, no error string is stored. This is the va_list version. β¨
Parameters:
contextβ Kerberos 5 context.retβ the error code.fmtβ error string for the error code.argsβprintf(3)style parameters.
β οΈ krb5_vwarn
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_vwarn (krb5_context context, krb5_error_code code, const char * fmt, va_list ap)
Logs a warning to the log (default stderr), includes the error from the last failure. This is the va_list version. β οΈ
Parameters:
contextβ a Kerberos 5 context.codeβ error code of the last error.fmtβ message to print.apβ arguments.
β οΈ krb5_vwarnx
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_vwarnx (krb5_context context, const char * fmt, va_list ap)
Logs a warning to the log (default stderr). No last error included. This is the va_list version. π
Parameters:
contextβ a Kerberos 5 context.fmtβ message to print.apβ arguments.
β οΈ krb5_warn
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_warn (krb5_context context, krb5_error_code code, const char * fmt, ...)
Logs a warning to the log (default stderr), includes the error from the last failure. Yes, the signature has that duplicated macro thing going on, but that's exactly how it is. π
Parameters:
contextβ a Kerberos 5 context.codeβ error code of the last error.fmtβ message to print.
β οΈ krb5_warnx
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_warnx (krb5_context context, const char * fmt, ...)
Logs a warning to the log (default stderr). No last error included. Again, that duplicated macro in the signature is not a typo, it's just how Doxygen rolled. π
Parameters:
contextβ a Kerberos 5 context.fmtβ message to print.
π Author
Generated automatically by Doxygen for Heimdal Kerberos 5 library from the source code.
And that's the tea, bestie! This page is from the Heimdal Kerberos 5 library, version 7.8.0, dated Tue Nov 15 2022. Stay slaying, and may your error messages always be clear. πβ¨π¦
π¦ where this page comes from
- alpine 3.22: heimdal-doc 7.8.0-r4 Β· BSD-3-Clause
- alpine 3.23: heimdal-doc 7.8.0-r5 Β· BSD-3-Clause
- alpine 3.24: heimdal-doc 7.8.0-r5 Β· BSD-3-Clause
- epel 10: heimdal-devel 7.8.0-26.el10_2 Β· BSD-2-Clause AND BSD-3-Clause AND HPND-export-US AND HPND-export2-US AND LicenseRef-Fedora-Public-Domain
- epel 9: heimdal-devel 7.8.0-5.el9 Β· BSD and MIT
- fedora 43: heimdal-devel 7.8.0-26.fc43 Β· BSD-2-Clause AND BSD-3-Clause AND HPND-export-US AND HPND-export2-US AND LicenseRef-Fedora-Public-Domain
- fedora 43: heimdal-devel 7.8.0-26.fc43 Β· BSD-2-Clause AND BSD-3-Clause AND HPND-export-US AND HPND-export2-US AND LicenseRef-Fedora-Public-Domain
- fedora 44: heimdal-devel 7.8.0-26.fc43 Β· BSD-2-Clause AND BSD-3-Clause AND HPND-export-US AND HPND-export2-US AND LicenseRef-Fedora-Public-Domain
- fedora 44: heimdal-devel 7.8.0-26.fc43 Β· BSD-2-Clause AND BSD-3-Clause AND HPND-export-US AND HPND-export2-US AND LicenseRef-Fedora-Public-Domain
- fedora 44: heimdal-devel 7.8.0-28.fc44 Β· BSD-2-Clause AND BSD-3-Clause AND HPND-export-US AND HPND-export2-US AND LicenseRef-Fedora-Public-Domain
- fedora 44: heimdal-devel 7.8.0-28.fc44 Β· BSD-2-Clause AND BSD-3-Clause AND HPND-export-US AND HPND-export2-US AND LicenseRef-Fedora-Public-Domain
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms