Bug 475916 - rkhunter daily update report includes colours when it shouldn't when run from cron
Summary: rkhunter daily update report includes colours when it shouldn't when run from...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: rkhunter
Version: el5
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
Assignee: Kevin Fenzi
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-12-11 04:22 UTC by Michael Mansour
Modified: 2009-05-14 05:06 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-05-14 05:06:33 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Michael Mansour 2008-12-11 04:22:44 UTC
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-14 00:14:50 UTC
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-14 00:28:40 UTC
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-14 00:41:00 UTC
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 05:32:52 UTC
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 05:41:43 UTC
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 09:24:46 UTC
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 09:25:45 UTC
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 09:31:23 UTC
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 16:32:13 UTC
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-24 02:33:45 UTC
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-24 02:39:04 UTC
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 06:25:21 UTC
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 12:54:01 UTC
Looks good to me.

Comment 14 Kevin Fenzi 2009-05-14 05:06:33 UTC
Excellent. Thanks for the report!


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