Re: [PATCH 1/1] log: do not print carriage return

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

 



On Fri, 6 Sep 2019, Christian Hesse wrote:

> From: Christian Hesse <mail@xxxxxxxx>
> 
> Logging to stderr results in line endings being terminated with carriage
> return (\r) and new line (\n). While this is fine for terminals it may
> have undesired effects when running from crond and logging to syslog
> or similar.
> 
> I run ssh from cron on an recent linux host. Viewing logs with
> journalctl I see:
> 
> Sep 06 16:50:01 linux CROND[152575]: [96B blob data]
> 
> Adding switch --all for unprintable characters it shows:
> 
> Sep 06 16:50:01 linux CROND[152575]: (root) CMDOUT (Warning: Permanently
> added '10.52.33.217' (ED25519) to the list of known hosts.^M)
> 
> Note the control character ^M. Removing the carriage return fixes this.

AFAIK we need the carriage return because the terminal may be in raw mode
and treating newline characters as advancing to the next line only.

-d
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@xxxxxxxxxxx
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev



[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux