1 diff -ruN rkhunter.orig/files/check_update.sh rkhunter/files/check_update.sh
2 --- rkhunter.orig/files/check_update.sh 2004-08-20 16:05:43.000000000 +0100
3 +++ rkhunter/files/check_update.sh 2005-04-25 17:51:23.000000000 +0100
6 echo -n "${FILEDESC}: "
7 UPDATEDBURL="${FIRSTMIRROR}/${VERSIONUPDATEURL}"
8 - ${WGETBINARY} -q -O /tmp/rkhunter.upd ${UPDATEDBURL}
10 - if [ -f /tmp/rkhunter.upd ]; then
11 - LATESTVERSION=`cat /tmp/rkhunter.upd`
12 - rm -f /tmp/rkhunter.upd
15 + if ! LATESTVERSION=`${WGETBINARY} -q -O - ${UPDATEDBURL}`; then
17 echo "Fatal error: Problem while fetching file"
22 CURRENTVERSION=`cat ${DBDIR}/${FILENAME} | grep '000:version' | cut -d ':' -f3`
26 GETFILE="${FIRSTMIRROR}/${FILENAME}.gz"
27 - ${WGETBINARY} -q -O /tmp/rkhunter.upd.gz ${GETFILE}
30 - # Gunzip it and place it on the right location
31 - gunzip /tmp/rkhunter.upd.gz
32 - mv /tmp/rkhunter.upd ${DBDIR}/${FILENAME}
33 + TMPFILE="`mktemp /tmp/rkhunter.upd.gz.XXXXXX`" || exit 1
34 + if ${WGETBINARY} -q -O - ${GETFILE} | gunzip -c > ${TMPFILE}; then
35 + mv ${TMPFILE} ${DBDIR}/${FILENAME}
36 echo " Action: Database updated (current version: ${CURRENTVERSION}, new version ${LATESTVERSION})"
38 echo "Fatal error: Can't retrieve file: ${GETFILE}"
40 rm -f ${MIRRORFILE}.new
43 - if [ -f /tmp/rkhunter.upd ]; then
44 - rm -f /tmp/rkhunter.upd
47 touch ${MIRRORFILE}.new
48 echo "${MIRRORSVERSION}" > ${MIRRORFILE}.new
49 for I in ${OTHERMIRRORS}; do
50 diff -ruN rkhunter.orig/files/rkhunter rkhunter/files/rkhunter
51 --- rkhunter.orig/files/rkhunter 2005-02-21 18:32:08.000000000 +0000
52 +++ rkhunter/files/rkhunter 2005-04-25 17:47:48.000000000 +0100
53 @@ -4421,16 +4421,16 @@
54 VERSION=`${I}/php -v | head -n 1 | awk '{ print $2 }'`
57 - VERSION=`${I}/procmail -v 2> /tmp/procmail.txt && cat /tmp/procmail.txt | grep 'procmail v' | awk '{ print $2 }' | tr -d 'v' && rm -f /tmp/procmail.txt`
58 + VERSION=`${I}/procmail -v 2>&1 | grep 'procmail v' | awk '{ print $2 }' | tr -d 'v'`
61 - VERSION=`${I}/proftpd -v 2> /tmp/proftpd.txt && cat /tmp/proftpd.txt | awk '{ print $4 }' && rm -f /tmp/proftpd.txt`
62 + VERSION=`${I}/proftpd -v 2>&1 | awk '{ print $4 }'`
65 VERSION=`${I}/squid -v | grep 'Squid Cache' | awk '{ print $4 }'`
68 - VERSION=`${I}/sshd -t -d 2> /tmp/openssh.txt && cat /tmp/openssh.txt | head -n 1 | awk '{ print $4 }' | cut -d '_' -f2 && rm -f /tmp/openssh.txt`
69 + VERSION=`${I}/sshd -t -d 2>&1 | head -n 1 | awk '{ print $4 }' | cut -d '_' -f2`
70 if [ ! "`echo "${VERSION}" | grep "+"`" = "" ]; then
71 VERSION=`echo "${VERSION}" | cut -d'+' -f1`