keyhole logo

Functions
Heimdal Kerberos 5 error reporting functions

Functions

KRB5_LIB_FUNCTION char *KRB5_LIB_CALL krb5_get_error_string (krb5_context context) KRB5_DEPRECATED_FUNCTION("Use krb5_get_error_message instead")
 
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_eai_to_heim_errno (int eai_errno, int system_error)
 
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_h_errno_to_heim_errno (int eai_errno)
 
KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_clear_error_message (krb5_context context)
 
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_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_LIB_FUNCTION void KRB5_LIB_CALL krb5_prepend_error_message (krb5_context context, krb5_error_code ret, const char *fmt,...) __attribute__((__format__(__printf__
 
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_LIB_FUNCTION const char *KRB5_LIB_CALL krb5_get_error_message (krb5_context context, krb5_error_code code)
 
KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_free_error_message (krb5_context context, const char *msg)
 
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_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_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_vwarnx (krb5_context context, const char *fmt, va_list ap) __attribute__((__format__(__printf__
 
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_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_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_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_verrx (krb5_context context, int eval, const char *fmt, va_list ap) __attribute__((__noreturn__
 
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_errx (krb5_context context, int eval, const char *fmt,...) __attribute__((__noreturn__
 
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_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_abort (krb5_context context, krb5_error_code code, const char *fmt,...) __attribute__((__noreturn__
 
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_abortx (krb5_context context, const char *fmt,...) __attribute__((__noreturn__
 
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_set_warn_dest (krb5_context context, krb5_log_facility *fac)
 
KRB5_LIB_FUNCTION krb5_log_facility *KRB5_LIB_CALL krb5_get_warn_dest (krb5_context context)
 

Detailed Description

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,
  ... 
)

Log a warning to the log, default stderr, include the error from the last failure and then abort.

Parameters
contextA Kerberos 5 context
codeerror code of the last error
fmtmessage to print
...arguments for format string

◆ krb5_abortx()

KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_abortx ( krb5_context  context,
const char *  fmt,
  ... 
)

Log a warning to the log, default stderr, and then abort.

Parameters
contextA Kerberos 5 context
fmtprintf format string of message to print
...arguments for 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.

Parameters
contextThe 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 
)

Convert the getaddrinfo() error code to a Kerberos et error code.

Parameters
eai_errnocontains the error code from getaddrinfo().
system_errorshould have the value of errno after the failed getaddrinfo().
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,
  ... 
)

Log a warning to the log, default stderr, include bthe error from the last failure and then exit.

Parameters
contextA Kerberos 5 context
evalthe exit code to exit with
codeerror code of the last error
fmtmessage to print

◆ krb5_errx()

KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_errx ( krb5_context  context,
int  eval,
const char *  fmt,
  ... 
)

Log a warning to the log, default stderr, and then exit.

Parameters
contextA Kerberos 5 context
evalthe exit code to exit with
fmtmessage to print

◆ krb5_free_error_message()

KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_free_error_message ( krb5_context  context,
const char *  msg 
)

Free the error message returned by krb5_get_error_message().

Parameters
contextKerberos context
msgerror message to free, returned byg krb5_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 
)

Return the error message for ‘code’ in context. On memory allocation error the function returns NULL.

Parameters
contextKerberos 5 context
codeError code related to the error
Returns
an error string, needs to be freed with krb5_free_error_message(). The functions return NULL on error.

◆ krb5_get_error_string()

KRB5_LIB_FUNCTION char* KRB5_LIB_CALL krb5_get_error_string ( krb5_context  context)

Return the error message in context. On error or no error string, the function returns NULL.

Parameters
contextKerberos 5 context
Returns
an error string, needs to be freed with krb5_free_error_message(). The functions return NULL on error.

◆ krb5_get_warn_dest()

KRB5_LIB_FUNCTION krb5_log_facility* KRB5_LIB_CALL krb5_get_warn_dest ( krb5_context  context)

Get the default logging facility.

Parameters
contextA 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)

Convert the gethostname() error code (h_error) to a Kerberos et error code.

Parameters
eai_errnocontains the error code from gethostname().
Returns
Kerberos error code representing the gethostname errors.

◆ 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,
  ... 
)

Prepend the context full error string for a specific error code. The error that is stored should be internationalized.

The if context is NULL, no error string is stored.

Parameters
contextKerberos 5 context
retThe error code
fmtError 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,
  ... 
)

Set the context full error string for a specific error code. The error that is stored should be internationalized.

The if context is NULL, no error string is stored.

Parameters
contextKerberos 5 context
retThe error code
fmtError 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 
)

Set the default logging facility.

Parameters
contextA Kerberos 5 context
facFacility 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 
)

Log a warning to the log, default stderr, include bthe error from the last failure and then abort.

Parameters
contextA Kerberos 5 context
codeerror code of the last error
fmtmessage to print
aparguments

◆ 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 
)

Log a warning to the log, default stderr, include bthe error from the last failure and then exit.

Parameters
contextA Kerberos 5 context
evalthe exit code to exit with
codeerror code of the last error
fmtmessage to print
aparguments

◆ krb5_verrx()

KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_verrx ( krb5_context  context,
int  eval,
const char *  fmt,
va_list  ap 
)

Log a warning to the log, default stderr, and then exit.

Parameters
contextA Kerberos 5 context
evalthe exit code to exit with
fmtmessage to print
aparguments

◆ 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 
)

Prepend the contexts's full error string for a specific error code.

The if context is NULL, no error string is stored.

Parameters
contextKerberos 5 context
retThe error code
fmtError string for the error code
argsprintf(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 
)

Set the context full error string for a specific error code.

The if context is NULL, no error string is stored.

Parameters
contextKerberos 5 context
retThe error code
fmtError string for the error code
argsprintf(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 
)

Log a warning to the log, default stderr, include the error from the last failure.

Parameters
contextA Kerberos 5 context.
codeerror code of the last error
fmtmessage to print
aparguments

◆ krb5_vwarnx()

KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_vwarnx ( krb5_context  context,
const char *  fmt,
va_list  ap 
)

Log a warning to the log, default stderr.

Parameters
contextA Kerberos 5 context.
fmtmessage to print
aparguments

◆ 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,
  ... 
)

Log a warning to the log, default stderr, include the error from the last failure.

Parameters
contextA Kerberos 5 context.
codeerror code of the last error
fmtmessage 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,
  ... 
)

Log a warning to the log, default stderr.

Parameters
contextA Kerberos 5 context.
fmtmessage to print

Generated on Tue Nov 15 2022 14:04:26 for Heimdal Kerberos 5 library by doxygen 1.9.1