rkhunter --update broken on non-English locales
Brought to you by:
dogsbody
Here''s the bug that was reported on the Debian tracker:
$ rkhunter --update [ Rootkit Hunter version 1.4.2 ] 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/de [ No update ] Checking file i18n/en [ No update ] /usr/bin/rkhunter: 7439: [: Binary: unexpected operator Checking file i18n/tr [ No update ] Checking file i18n/tr.utf8 [ No update ] /usr/bin/rkhunter: 7439: [: Binary: unexpected operator Checking file i18n/zh [ No update ] Checking file i18n/zh.utf8 [ No update ]
The work-around is to explicitly set the C locale when doing updates:
LANG=C rkhunter --update
I can reproduce the above when setting my locale as fr_CA.
Here's the patch I applied to the Debian package to fix this problem.
Already fixed in CVS.