mirror of
https://git.openafs.org/openafs.git
synced 2025-01-20 16:00:12 +00:00
aklog: Fix error message fallback for Heimdal
Since we reverted to using Russ's upstream version of rra-c-util's krb5.m4, we no longer check for the existence of the pure com_err error_message(). So, for error message fallback on Heimdal, use krb5_get_error_message() instead. As we don't have access to the context in which the error occurred, build one to get the raw com_err error translation - this won't give us any additional context specific detail. Change-Id: I4bab080704ec5d08e8b85e6b7ad69cf1f89bf3b3 Reviewed-on: http://gerrit.openafs.org/7554 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com> Reviewed-by: Derrick Brashear <shadow@dementix.org>
This commit is contained in:
parent
5db615100a
commit
9b97b80dd8
@ -310,8 +310,11 @@ redirect_errors(const char *who, afs_int32 code, const char *fmt, va_list ap)
|
||||
if (strncmp(str, "unknown", strlen("unknown")) == 0) {
|
||||
#ifdef HAVE_KRB5_SVC_GET_MSG
|
||||
krb5_svc_get_msg(code,&str);
|
||||
#elif defined(HAVE_ERROR_MESSAGE)
|
||||
str = error_message(code);
|
||||
#elif defined(HAVE_KRB5_GET_ERROR_MESSAGE)
|
||||
krb5_context context;
|
||||
krb5_init_context(&context);
|
||||
str = krb5_get_error_message(context, code);
|
||||
krb5_free_context(context);
|
||||
#else
|
||||
; /* IRIX apparently has neither: use the string we have */
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user