Bug 490897 - syslog does not include a newline when logging to console/tty
syslog does not include a newline when logging to console/tty
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: sysklogd (Show other bugs)
All Linux
medium Severity medium
: rc
: ---
Assigned To: Peter Vrabec
BaseOS QE Security Team
: Patch, Regression
Depends On:
  Show dependency treegraph
Reported: 2009-03-18 10:08 EDT by Olivier Fourdan
Modified: 2013-03-03 21:48 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-03-30 04:15:48 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Proposed patch (364 bytes, patch)
2009-03-18 10:08 EDT, Olivier Fourdan
no flags Details | Diff

  None (edit)
Description Olivier Fourdan 2009-03-18 10:08:26 EDT
Created attachment 335702 [details]
Proposed patch

Description of problem:

The fix for bug #223573 introduced a regression with syslog when logging to the console, no line feed is inserted and all the syslog messages are displayed on a single line.

Version-Release number of selected component (if applicable):


How reproducible:

100% reproducible

Steps to Reproduce:
1. Create a user (e.g. "cons")
2. Log syslog messages for that user by modifying syslog.conf to
   *.info;mail.none;authpriv.none;cron.none;daemon.warning       cons
3. Login as "cons" on a console and observe the messages
Actual results:

All messages are printed one after the other on the same line

Expected results:

One line per message

Additional info:

This is a regression that was introduced in sysklogd-1.4.1-40.el5-x86_64 by the fix for the BZ#223573.

An additional field has been added to include priority/facility, but the logging to console has not been modified to include that additional field.

  @@ -1698,7 +1703,7 @@
        int flags;
        char *msg;
  -      struct iovec iov[6];
  +      struct iovec iov[7];
  @@ -1859,7 +1907,7 @@
                if (f->f_file == -1)
  -              if (writev(f->f_file, iov, 6) < 0) {
  +              if (writev(f->f_file, iov, 7) < 0) {
                      int e = errno;

But the same needs to be done for when logging to a tty too.

Proposed patch attached.
Comment 2 RHEL Product and Program Management 2009-03-18 10:21:48 EDT
This bugzilla has Keywords: Regression.  

Since no regressions are allowed between releases, 
it is also being proposed as a blocker for this release.  

Please resolve ASAP.
Comment 8 errata-xmlrpc 2010-03-30 04:15:48 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


Note You need to log in before you can comment on or make changes to this bug.