]> granicus.if.org Git - sudo/commitdiff
Add missing newline when logging to a file (not syslog) and
authorTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 26 Apr 2016 20:39:42 +0000 (14:39 -0600)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 26 Apr 2016 20:39:42 +0000 (14:39 -0600)
loglinelen is set to a non-positive number.  Bug #742

plugins/sudoers/logging.c

index ed3c8be1ef2a8dd3eaa77cceea752c4645e96f86..0e356fcb2207af0f825a5696385bcbc2e7ff45ac 100644 (file)
@@ -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);