krb5 commit: Fix type error in klog com_err hook

Greg Hudson ghudson at mit.edu
Mon Jan 22 12:26:34 EST 2018


https://github.com/krb5/krb5/commit/5a5be01e888a575b72407088749066213c57284f
commit 5a5be01e888a575b72407088749066213c57284f
Author: Greg Hudson <ghudson at mit.edu>
Date:   Fri Jan 19 13:01:43 2018 -0500

    Fix type error in klog com_err hook
    
    As a variable argument, buf.data won't be automatically cast from
    void * to char * when passed to krb5_klog_syslog(), so to be correct
    we must do it manually.
    
    ticket: 8630

 src/lib/kadm5/logger.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/lib/kadm5/logger.c b/src/lib/kadm5/logger.c
index 771ab67..2da8f92 100644
--- a/src/lib/kadm5/logger.c
+++ b/src/lib/kadm5/logger.c
@@ -201,7 +201,7 @@ klog_com_err_proc(const char *whoami, long int code, const char *format, va_list
     k5_buf_add_vfmt(&buf, format, ap);
 
     if (k5_buf_status(&buf) == 0)
-        krb5_klog_syslog(code ? LOG_ERR : LOG_INFO, "%s", buf.data);
+        krb5_klog_syslog(code ? LOG_ERR : LOG_INFO, "%s", (char *)buf.data);
 
     k5_buf_free(&buf);
 }


More information about the cvs-krb5 mailing list