Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 May 2015 16:55:58 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   [Bug 200270] sysutils/rsyslog8, sysutils/rsyslog7, sysutils/rsyslog8-devel, sysutils/rsyslog7-devel: When logging on the console, rsyslog writes "\n" instead of "\r\n". Therefore, console output is made of lines that start at the column where the previous line ended.
Message-ID:  <bug-200270-13@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=200270

            Bug ID: 200270
           Summary: sysutils/rsyslog8, sysutils/rsyslog7,
                    sysutils/rsyslog8-devel, sysutils/rsyslog7-devel: When
                    logging on the console, rsyslog writes "\n" instead of
                    "\r\n". Therefore, console output is made of lines
                    that start at the column where the previous line
                    ended.
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: Individual Port(s)
          Assignee: freebsd-ports-bugs@FreeBSD.org
          Reporter: fbsd.bugzilla@fenyo.net

Created attachment 156857
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=156857&action=edit
rsyslog patch to correct this bug

The attached patch is written to work correctly for each of the 4 rsyslog
ports: sysutils/rsyslog8, sysutils/rsyslog7, sysutils/rsyslog8-devel,
sysutils/rsyslog7-devel

When logging on the console, rsyslog writes "\n" (NL) instead of "\r\n" (CRNL).
Therefore, console output is made of lines that do not start at the first
column.

This bug in rsyslog is linked to the bug report 199767 about getty and has been
confirmed by Konstantin Belousov on comment 4:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=199767#c4

One may think it is not necessary to patch rsyslog since it could be possible
to automatically convert any "\n" char that rsyslog writes to the console to
"\r\n", simply setting the opost and onlcr output mode flags on the console
(using /etc/gettytab).

But for some tricky reasons that are explained in bug report 199767, it is not
possible for those flags to be set at any time, specifically because of this
getty behaviour: when getty is waiting for a login, it clears the opost flag to
handle the line-mode by itself (the terminal device is in raw mode during this
step, the output flag opost is cleared and line-mode processing, like handling
backspaces or ^U, is done by getty, not by the terminal driver).

So, rsyslog must be patched because it can not work correctly on a console
attached to getty.

the corresponding patch is attached to this bug report. It must be added to the
files directory of each rsyslog port.

-- 
You are receiving this mail because:
You are the assignee for the bug.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-200270-13>