Bug 475916 - rkhunter daily update report includes colours when it shouldn't when run from cron
rkhunter daily update report includes colours when it shouldn't when run from...
Status: CLOSED CURRENTRELEASE
Product: Fedora EPEL
Classification: Fedora
Component: rkhunter (Show other bugs)
el5
x86_64 Linux
low Severity medium
: ---
: ---
Assigned To: Kevin Fenzi
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-12-10 23:22 EST by Michael Mansour
Modified: 2009-05-14 01:06 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-05-14 01:06:33 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Michael Mansour 2008-12-10 23:22:44 EST
Description of problem:

rkhunter daily update report includes colours when it shouldn't when run from cron.

The /etc/cron.daily/rkhunter file emails daily with contents of:

[1;33mChecking rkhunter data files...[0;39m
Checking file mirrors.dat[34C[ [1;32mNo update[0;39m ]
Checking file programs_bad.dat[29C[ [1;32mNo update[0;39m ]
Checking file backdoorports.dat[28C[ [1;32mNo update[0;39m ]
Checking file suspscan.dat[33C[ [1;32mNo update[0;39m ]
Checking file i18n/cn[38C[ [1;32mNo update[0;39m ]
Checking file i18n/en[38C[ [1;32mNo update[0;39m ]
Checking file i18n/zh[38C[ [1;32mNo update[0;39m ]
Checking file i18n/zh.utf8[33C[ [1;32mNo update[0;39m ]

when it should look like:

Checking rkhunter data files...
Checking file mirrors.dat [ No update ]
Checking file programs_bad.dat [ No update ]
Checking file backdoorports.dat [ No update ]
Checking file suspscan.dat [ No update ]
Checking file i18n/cn [ No update ]
Checking file i18n/en [ No update ]
Checking file i18n/zh [ No update ]
Checking file i18n/zh.utf8 [ No update ]

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

rkhunter-1.3.2-4.el4.noarch

How reproducible:

100% reproducible every time.

Steps to Reproduce:
1. verify /etc/cron.daily/rkhunter exists and is run in cron
2.
3.
  
Actual results:

[1;33mChecking rkhunter data files...[0;39m
Checking file mirrors.dat[34C[ [1;32mNo update[0;39m ]
Checking file programs_bad.dat[29C[ [1;32mNo update[0;39m ]
Checking file backdoorports.dat[28C[ [1;32mNo update[0;39m ]
Checking file suspscan.dat[33C[ [1;32mNo update[0;39m ]
Checking file i18n/cn[38C[ [1;32mNo update[0;39m ]
Checking file i18n/en[38C[ [1;32mNo update[0;39m ]
Checking file i18n/zh[38C[ [1;32mNo update[0;39m ]
Checking file i18n/zh.utf8[33C[ [1;32mNo update[0;39m ]


Expected results:

Checking rkhunter data files...
Checking file mirrors.dat [ No update ]
Checking file programs_bad.dat [ No update ]
Checking file backdoorports.dat [ No update ]
Checking file suspscan.dat [ No update ]
Checking file i18n/cn [ No update ]
Checking file i18n/en [ No update ]
Checking file i18n/zh [ No update ]
Checking file i18n/zh.utf8 [ No update ]


Additional info:

This has been discussed on the rkhunter mailing list, and the fix is to add --nocolors to the /etc/cron.daily/rkhunter file ie. on this line:

/bin/nice -n 10 $RKHUNTER --update 2>&1 >> $TMPFILE1

change to:

/bin/nice -n 10 $RKHUNTER --update --nocolors 2>&1 >> $TMPFILE1
Comment 1 Kevin Fenzi 2008-12-13 19:14:50 EST
Yeah, agreed. 

Thanks for reporting this. 

I am going to make a number of changes to the rawhide package here soon, 
then if those look good, apply as fedora updates-testing, then updates, then I will move the changes to EPEL. Sorry for any delays that might cause.
Comment 2 GeoffLeach 2008-12-13 19:28:40 EST
In addition, the execution with --cronjob should have --nocolors added. The rkhunter man page says --nocolors is assumed, but it appears that it is not.
Comment 3 Kevin Fenzi 2008-12-13 19:41:00 EST
Humm. I wonder if thats the real cause of bug 472679. 

Will investigate. Thanks for the info!
Comment 4 Fedora Update System 2009-01-05 00:32:52 EST
rkhunter-1.3.4-1.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/rkhunter-1.3.4-1.fc10
Comment 5 Fedora Update System 2009-01-05 00:41:43 EST
rkhunter-1.3.4-1.fc9 has been submitted as an update for Fedora 9.
http://admin.fedoraproject.org/updates/rkhunter-1.3.4-1.fc9
Comment 6 Fedora Update System 2009-01-07 04:24:46 EST
rkhunter-1.3.4-1.fc10 has been pushed to the Fedora 10 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update rkhunter'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F10/FEDORA-2009-0153
Comment 7 Fedora Update System 2009-01-07 04:25:45 EST
rkhunter-1.3.4-1.fc9 has been pushed to the Fedora 9 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing-newkey update rkhunter'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F9/FEDORA-2009-0163
Comment 8 Michael Mansour 2009-01-07 04:31:23 EST
How will this make its way to the EPEL repo? I don't use Fedora but use el4 and el5 servers. Thanks.
Comment 9 Kevin Fenzi 2009-01-07 11:32:13 EST
I would like to let it get a bit more testing in Fedora branches, then I will update EPEL if all looks well. ;)
Comment 10 Fedora Update System 2009-01-23 21:33:45 EST
rkhunter-1.3.4-1.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 11 Fedora Update System 2009-01-23 21:39:04 EST
rkhunter-1.3.4-1.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 12 Kevin Fenzi 2009-05-11 02:25:21 EDT
The version in epel now should have this fix in it. 

Can you confirm that it's working as expected now?
Comment 13 GeoffLeach 2009-05-11 08:54:01 EDT
Looks good to me.
Comment 14 Kevin Fenzi 2009-05-14 01:06:33 EDT
Excellent. Thanks for the report!

Note You need to log in before you can comment on or make changes to this bug.