From: Todd C. Miller Date: Tue, 26 Apr 2016 20:39:42 +0000 (-0600) Subject: Add missing newline when logging to a file (not syslog) and X-Git-Tag: SUDO_1_8_17^2~130 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=57b1dc5e1d85a408d42ef15d513e138a130522c9;p=sudo Add missing newline when logging to a file (not syslog) and loglinelen is set to a non-positive number. Bug #742 --- diff --git a/plugins/sudoers/logging.c b/plugins/sudoers/logging.c index ed3c8be1e..0e356fcb2 100644 --- a/plugins/sudoers/logging.c +++ b/plugins/sudoers/logging.c @@ -176,6 +176,7 @@ do_logfile(const char *msg) if ((size_t)def_loglinelen < sizeof(LOG_INDENT)) { /* Don't pretty-print long log file lines (hard to grep). */ (void) fputs(full_line, fp); + (void) fputc('\n', fp); } else { /* Write line with word wrap around def_loglinelen chars. */ writeln_wrap(fp, full_line, len, def_loglinelen);