Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 292934 - sys-process/vixie-cron: spurious newline in error message
Summary: sys-process/vixie-cron: spurious newline in error message
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High trivial (vote)
Deadline: 2019-10-11
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords: PMASKED
Depends on:
Blocks:
 
Reported: 2009-11-12 18:32 UTC by Myk Taylor
Modified: 2019-10-11 15:07 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
fixes typo (fix_do_command_c_typo.patch,384 bytes, patch)
2009-11-12 18:34 UTC, Myk Taylor
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.