On 2015-07-05 at 16:52:04, Pedro Beja wrote:
> doing an update I get the following error line:
> 
> $ sudo rkhunter --update

[snip]

> /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 ]

This seems to happen only on non-English locales. Try this (as root):

  LANG=C rkhunter --update

If I output the variables from line 7439 on a fr_CA locale, I get this:

  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 ]
  PROG_VERS=2009091601; LATEST_VERS=2009091601
    Checking file i18n/cn                                      [ No update ]
  PROG_VERS=2014010301; LATEST_VERS=2014010301
    Checking file i18n/de                                      [ No update ]
  PROG_VERS=2013112401; LATEST_VERS=2013112401
    Checking file i18n/en                                      [ No update ]
  PROG_VERS=Fichier binaire /var/lib/rkhunter/db/i18n/tr correspondant; 
LATEST_VERS=2014030201
  /usr/bin/rkhunter: 7440: [: Fichier: unexpected operator
    Checking file i18n/tr                                      [ No update ]
  PROG_VERS=2014030201; LATEST_VERS=2014030201
    Checking file i18n/tr.utf8                                 [ No update ]
  PROG_VERS=Fichier binaire /var/lib/rkhunter/db/i18n/zh correspondant; 
LATEST_VERS=2009091601
  /usr/bin/rkhunter: 7440: [: Fichier: unexpected operator
    Checking file i18n/zh                                      [ No update ]
  PROG_VERS=2009091601; LATEST_VERS=2009091601
    Checking file i18n/zh.utf8                                 [ No update ]

The attached patch to the cronjob in /etc is a work-around until this is
fixed upstream.

Francois
diff --git a/cron.weekly/rkhunter b/cron.weekly/rkhunter
index 6976920..e82cd5a 100755
--- a/cron.weekly/rkhunter
+++ b/cron.weekly/rkhunter
@@ -25,12 +25,12 @@ case "$CRON_DB_UPDATE" in
                         echo "To: $REPORT_EMAIL"
                         echo ""
                         $RKHUNTER --versioncheck --nocolors --appendlog
-                        $RKHUNTER --update --nocolors --appendlog
+                        LANG=C $RKHUNTER --update --nocolors --appendlog
                         ) | /usr/sbin/sendmail $REPORT_EMAIL
                     ;;
                     *)
                         $RKHUNTER --versioncheck --appendlog 1>/dev/null 2>$OUTFILE
-                        $RKHUNTER --update --appendlog 1>/dev/null 2>>$OUTFILE
+                        LANG=C $RKHUNTER --update --appendlog 1>/dev/null 2>>$OUTFILE
                     ;;
                 esac
 

Reply via email to