diff --git a/appl/su/su.c b/appl/su/su.c index 882ecfaed..902af4b04 100644 --- a/appl/su/su.c +++ b/appl/su/su.c @@ -433,8 +433,12 @@ main(int argc, char **argv) #endif { char *tty = ttyname (STDERR_FILENO); - syslog (LOG_NOTICE | LOG_AUTH, tty ? "%s to %s on %s" : "%s to %s", - login_info->pw_name, su_info->pw_name, tty); + if (tty) + syslog (LOG_NOTICE | LOG_AUTH, "%s to %s on %s", + login_info->pw_name, su_info->pw_name, tty); + else + syslog (LOG_NOTICE | LOG_AUTH, "%s to %s", + login_info->pw_name, su_info->pw_name); } diff --git a/kdc/log.c b/kdc/log.c index 6d85729f5..6850bedd9 100644 --- a/kdc/log.c +++ b/kdc/log.c @@ -53,7 +53,7 @@ kdc_openlog(krb5_context context, char *ss; if (asprintf(&ss, "0-1/FILE:%s/%s", hdb_db_dir(context), KDC_LOG_FILE) < 0) - err(1, NULL); + err(1, "out of memory"); krb5_addlog_dest(context, config->logf, ss); free(ss); }