Bug 985888

Summary: cronie drops $LANG and never passes it on to jobs run
Product: Red Hat Enterprise Linux 6 Reporter: Marcela Mašláňová <mmaslano>
Component: cronieAssignee: Marcela Mašláňová <mmaslano>
Status: CLOSED ERRATA QA Contact: qe-baseos-daemons
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.5CC: azelinka, jprokes, mmaslano, pertusus, tmraz, wolfgang.rupprecht
Target Milestone: rcKeywords: Patch
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: cronie-1.4.4-9.el6 Doc Type: Bug Fix
Doc Text:
Cause: $LANG seeting wasn't properly used by cron. Consequence: Jobs run from crond are not run with the system-wide $LANG setting. Fix: Cron reads setting of $LANG and use it in jobs. Result: $LANG setting is used by cron jobs.
Story Points: ---
Clone Of: 969761
: 1890144 (view as bug list) Environment:
Last Closed: 2013-11-21 22:24:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 969761    
Bug Blocks: 1890144    

Description Marcela Mašláňová 2013-07-18 12:44:54 UTC
+++ This bug was initially created as a clone of Bug #969761 +++

Description of problem:

Jobs run from crond are not run with the system-wide $LANG setting.  This results in mail sent by cron being slightly mangled with the wrong content type encoding.  This affects any mail that mentions the release name Schrödinger such as mail sent from rkhunter.

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

cronie.x86_64              1.4.10-4.fc19

How reproducible:
always

Steps to Reproduce:
1. echo $LANG
2. run env from crontab
   crontab -e
add: 
* * * * * /usr/bin/env
3. wait for the mail from cron

Actual results:
No LANG= reported  

Expected results:
LANG= reported and the same as the LANG= setting in /etc/locale.conf

Additional info:

running the env command from a systend started service does confirm that systemd passes that $LANG variable into a service's initial environment.  Crond just drops it.

--- Additional comment from Fedora Update System on 2013-06-11 20:56:37 CEST ---

cronie-1.4.10-5.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/cronie-1.4.10-5.fc19

--- Additional comment from Wolfgang Rupprecht on 2013-06-12 01:37:13 CEST ---

Works for me.  thanks!

I added karma.

--- Additional comment from Fedora Update System on 2013-06-12 21:11:22 CEST ---

Package cronie-1.4.10-5.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing cronie-1.4.10-5.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-10687/cronie-1.4.10-5.fc19
then log in and leave karma (feedback).

--- Additional comment from Fedora Update System on 2013-06-14 06:52:33 CEST ---

cronie-1.4.10-5.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 5 errata-xmlrpc 2013-11-21 22:24:50 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-1681.html