Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 292934

Summary: sys-process/vixie-cron: spurious newline in error message
Product: Gentoo Linux Reporter: Myk Taylor <myk002>
Component: [OLD] Core systemAssignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it <maintainer-needed>
Status: RESOLVED OBSOLETE    
Severity: trivial CC: cron-bugs+disabled, treecleaner
Priority: High Keywords: PMASKED
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Deadline: 2019-10-11   
Attachments: fixes typo

Description Myk Taylor 2009-11-12 18:32:35 UTC
sys-process/vixie-cron-4.1-r10

The string: "mailed %d byte%s of output but got status 0x%04x\n" is newline-terminated, which is improper for a string passed to log_it().  It looks like this used to be sent to Debug(), which does require a newline termination, but was changed to a log message without removing the newline.  The typo is on line 508 of do_command.c.

Reproducible: Always

Steps to Reproduce:
1. ensure the hostname 'mail' is unresolvable
2. start a cron job that outputs something on stdout
3. observe the miswritten error message in syslog

Actual Results:  
The following lines appear in /var/log/messages:

Nov 12 10:01:58 myhostname sSMTP[26991]: Unable to locate mail
Nov 12 10:01:58 myhostname sSMTP[26991]: Cannot open mail:25
Nov 12 10:01:58 myhostname cron[25607]: (root) MAIL (mailed 45 bytes of output but got status 0x0001
Nov 12 10:01:58 myhostname ):

Expected Results:  
Should have seen:

Nov 12 10:01:58 myhostname sSMTP[26991]: Unable to locate mail
Nov 12 10:01:58 myhostname sSMTP[26991]: Cannot open mail:25
Nov 12 10:01:58 myhostname cron[25607]: (root) MAIL (mailed 45 bytes of output but got status 0x0001)
Comment 1 Myk Taylor 2009-11-12 18:34:36 UTC
Created attachment 210046 [details, diff]
fixes typo
Comment 2 Myk Taylor 2012-07-22 04:47:38 UTC
This is still applicable to vixie-cron-4.1-r12
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-10-11 15:07:54 UTC
Package removed.