mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-31 06:15:37 +00:00
Add missing newline when logging to a file (not syslog) and
loglinelen is set to a non-positive number. Bug #742
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user