Bug#767731: /usr/bin/rkhunter: 13967: [: -ne: unexpected operator

Benoit Friry benoit at friry.net
Sun Nov 2 08:12:34 UTC 2014


Package: rkhunter
Version: 1.4.2-0.2
Severity: important

Bonjour,

Since upgrade to 1.4.2-0.2, I get cron errors:
/etc/cron.daily/rkhunter:
/usr/bin/rkhunter: 13967: [: -ne: unexpected operator

This line is:
if [ `${IPCS_CMD} -u 2>/dev/null | awk -F' ' '/segments allocated/ {print $3}'` -ne 0 ]; then

To compare with:
# ipcs -u 2>/dev/null

------ États des messages --------
files allouées = 0
en-têtes utilisées = 0
espace utilisé = 0 octets

------ État de la mémoire partagée --------
segments alloués = 28
pages alloués = 7428
pages résidentes = 6773
pages d'échange = 0
performance de l'espace d'échange = 0 tentatives	 0 succès

------ États des sémaphores --------
tableaux utilisés = 3
sémaphores alloués = 35

My default locale is French:
# cat /etc/default/locale 
#  File generated by update-locale
LANG="fr_FR.UTF-8"

I created a /usr/bin/rkhunter.new and forced LANG=C before line 13967,
adapted /etc/cron.daily/rkhunter, and I don't have error anymore.

I suggest using data from /proc if possible (I did not find how to get 
these data from there), or force LANG=C.

Thanks,
Benoit


-- System Information:
Debian Release: jessie/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.16-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages rkhunter depends on:
ii  binutils               2.24.90.20141023-1
ii  debconf [debconf-2.0]  1.5.53
ii  file                   1:5.20-1
ii  net-tools              1.60-26
ii  perl                   5.20.1-2
ii  ucf                    3.0030

Versions of packages rkhunter recommends:
ii  curl                               7.38.0-2
ii  iproute                            1:3.16.0-2
ii  lsof                               4.86+dfsg-1
ii  lynx                               2.8.9dev1-2
ii  nullmailer [mail-transport-agent]  1:1.13-1
pn  unhide.rb | unhide                 <none>
ii  wget                               1.15-1+b1

Versions of packages rkhunter suggests:
ii  bsd-mailx [mailx]         8.1.2-0.20140825cvs-1
pn  libdigest-whirlpool-perl  <none>
ii  liburi-perl               1.64-1
ii  libwww-perl               6.08-1
ii  mailutils [mailx]         1:2.99.98-2
ii  powermgmt-base            1.31+nmu1
pn  tripwire                  <none>

-- Configuration Files:
/etc/cron.daily/rkhunter changed [not included]

-- debconf information excluded



More information about the forensics-devel mailing list