Bug 1105008 - rkhunter fails on line 13967: [: unary operator expected, -ne found
Summary: rkhunter fails on line 13967: [: unary operator expected, -ne found
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: rkhunter
Version: el6
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Kevin Fenzi
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-06-05 08:16 UTC by Patrick Bervoets
Modified: 2016-04-20 16:23 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-04-20 16:23:30 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Patrick Bervoets 2014-06-05 08:16:26 UTC
Description of problem:
rkhunter throws an error when execution on line 13967: [: unary operator expected, -ne found
Script continues.

Version-Release number of selected component (if applicable):
yum info rkhunter
[...]
Installed Packages
Name        : rkhunter
Arch        : noarch
Version     : 1.4.2
Release     : 1.el6
Size        : 794 k
Repo        : installed
From repo   : epel
[...]

How reproducible:
Everytime

Steps to Reproduce:
1. /usr/bin/rkhunter
2.
3.

Actual results:
/usr/bin/rkhunter: regel 13967: [: eenzijdige operator werd verwacht, -ne gevonden

Expected results:
?

Additional info:
cat -n /usr/bin/rkhunter | head -n 13972 | tail -n 11
 13962                          get_temp_file "${RKHTMPDIR}/ipcs.tmp"
 13963                          IPCS_TMPFILE="${TEMPFILE}"
 13964                          touch "${IPCS_TMPFILE}"
 13965                          FOUND=0; echo $FOUND > "${IPCS_TMPFILE}"
 13966
 13967                          if [ `${IPCS_CMD} -u 2>/dev/null | awk -F' ' '/segments allocated/ {print $3}'` -ne 0 ]; then
 13968                                  ${IPCS_CMD} -m | grep "^0x" | while read RKH_SHM_KEY RKH_SHM_SHMID RKH_SHM_OWNER RKH_SHM_PERMS RKH_SHM_BYTES RKH_SHM_NATTACH RKH_SHM_STATUS; do
 13969                                          if [ $RKH_SHM_PERMS -eq 666 -a $RKH_SHM_BYTES -ge 1000000 ]; then
 13970                                                  FOUND=1; echo $FOUND > "${IPCS_TMPFILE}"
 13971                                                  ${IPCS_CMD} -p | grep "^${RKH_SHM_SHMID}" | while read RKH_SHM_SHMID RKH_SHM_OWNER RKH_SHM_CPID RKH_SHM_LPID; do
 13972                                                          RKH_SHM_PATH=`${READLINK_CMD} -f /proc/${RKH_SHM_CPID}/exe`

I don't know if I have to report this to you or upstream.
Found nothing searching for rkhunter line 13967 unary operator
Thanks for looking at it.

Comment 1 Kevin Fenzi 2014-06-05 14:53:08 UTC
This should already be fixed in: 

https://admin.fedoraproject.org/updates/FEDORA-EPEL-2014-1543/rkhunter-1.4.2-2.el6

Can you please test and add karma?

Comment 2 Patrick Bervoets 2014-06-05 15:18:10 UTC
Kevin,

It didn't help. 
My OS language is Dutch (nl).

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 ]
  Checking file i18n/tr                                      [ No update ]
  Checking file i18n/tr.utf8                                 [ No update ]
  Checking file i18n/zh                                      [ No update ]
  Checking file i18n/zh.utf8                                 [ No update ]

Comment 3 Patrick Bervoets 2014-06-05 15:29:37 UTC
Sorry ignore previous comment. 

After installation of rkhunter-1.4.2-2.el6
Running Transaction
  Updating   : rkhunter-1.4.2-2.el6.noarch
  Cleanup    : rkhunter-1.4.2-1.el6.noarch
  Verifying  : rkhunter-1.4.2-2.el6.noarch
  Verifying  : rkhunter-1.4.2-1.el6.noarch
Updated:
  rkhunter.noarch 0:1.4.2-2.el6

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 ]
  Checking file i18n/tr                                      [ No update ]
  Checking file i18n/tr.utf8                                 [ No update ]
  Checking file i18n/zh                                      [ No update ]
  Checking file i18n/zh.utf8                                 [ No update ]

rkhunter --check
Invalid RTKT_FILE_WHITELIST configuration option: Non-existent pathname: /var/log/pki-ca/system

Comment 4 Kevin Fenzi 2014-06-06 18:51:11 UTC
Please try: 

https://admin.fedoraproject.org/updates/rkhunter-1.4.2-3.el6

Thanks.

Comment 5 Patrick Bervoets 2014-06-11 11:28:50 UTC
This is perfect. 
Many thanks

(sorry for the delay)

Comment 6 Kevin Fenzi 2016-04-20 16:23:30 UTC
This was fixed a while back. ;)


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