KRB5_RD_ERROR(3)
π KRB5_RD_ERROR π
okay bestie, so this is the KRB5_RD_ERROR(3) page from the Library Functions Manual, and it's literally all about parsing, freeing, and reading errors out of a KRB-ERROR message. it lives in the Kerberos 5 Library (that's libkrb5, link it with -lkrb5, mwah π
).
β¨ NAME β¨
krb5_rd_error, krb5_free_error, krb5_free_error_contents, krb5_error_from_rd_error β parse, free and read error from KRB-ERROR message π«Ά
π LIBRARY π
Kerberos 5 Library (libkrb5, -lkrb5) β she's iconic, she's linked in, she's ready.
πΈ SYNOPSIS πΈ
#include <krb5.h>
krb5_error_code
krb5_rd_error(krb5_context context, const krb5_data *msg,
KRB_ERROR *result);
void
krb5_free_error(krb5_context context, krb5_error *error);
void
krb5_free_error_contents(krb5_context context, krb5_error *error);
krb5_error_code
krb5_error_from_rd_error(krb5_context context, const krb5_error *error,
const krb5_creds *creds);
π¦ DESCRIPTION π¦
okay so real talk: normally your app is never gonna need to parse and understand Kerberos error messages, because the higher level functions already parse them and push the error up into the krb5_context for you. so likeβ¦ these functions exist for completeness. no cap. they're described here because the docs gotta be thorough, not because you need them on the daily π
krb5_rd_error() parses and returns the kerboeros error message. and listen β that structure? it should be freed with krb5_free_error_contents() once the caller is done with it. don't leave her hanging π
krb5_free_error() frees the content and the memory region holding the structure itself. both. she takes everything. periodt.
krb5_free_error_contents() frees the content of the KRB-ERROR message. just the contents, not the whole structure. lowkey specific, highkey useful π
krb5_error_from_rd_error() will parse the error message and set the error buffer in krb5_context to the error string passed back β or the matching error code in the KRB-ERROR message. and then, bestie, the caller should pick up the message with krb5_get_error_string(3). oh and don't forget to free the returned string with krb5_free_error_string() β I'm literally begging you, free your strings π«Άβ¨
fr fr: if you don't free the string from krb5_get_error_string(3), that's a leak and we do not stan leaks in this house π
π SEE ALSO π
krb5(3), krb5_set_error_string(3), krb5_get_error_string(3), krb5.conf(5)
and that's the whole vibe, bestie π this was the HEIMDAL flavor of KRB5_RD_ERROR(3), dated July 26, 2004 β yes she's an elder but she still ate π mwah, go free your errors β¨πΈ
π¦ 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
- debian bookworm: heimdal-dev 7.8.git20221117.28daf24+dfsg-2 Β· BSD-3-Clause
- debian trixie: heimdal-dev 7.8.git20221117.28daf24+dfsg-9+deb13u1 Β· 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
- nixpkgs unstable: heimdal 7.8.0-unstable-2024-09-10
- ubuntu jammy: heimdal-dev 7.7.0+dfsg-3ubuntu1 Β· BSD-3-Clause
- ubuntu noble: heimdal-dev 7.8.git20221117.28daf24+dfsg-5ubuntu3 Β· BSD-3-Clause
- ubuntu questing: heimdal-dev 7.8.git20221117.28daf24+dfsg-9ubuntu1
- ubuntu resolute: heimdal-dev 7.8.git20221117.28daf24+dfsg-11ubuntu1 Β· BSD-3-Clause
- ubuntu stonking: heimdal-dev 7.8.git20240113.1b4565a+dfsg-2ubuntu1 Β· BSD-3-Clause
- Copyright (c) 2004 Kungliga Tekniska HΓΆgskolan
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms