Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 57197 Details for
Bug 90007
app-forensics/rkhunter Insecure temp file creation
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
suggested fix
rkhunter.diff (text/plain), 3.04 KB, created by
Tavis Ormandy (RETIRED)
on 2005-04-25 09:54:52 UTC
(
hide
)
Description:
suggested fix
Filename:
MIME Type:
Creator:
Tavis Ormandy (RETIRED)
Created:
2005-04-25 09:54:52 UTC
Size:
3.04 KB
patch
obsolete
>diff -ruN rkhunter.orig/files/check_update.sh rkhunter/files/check_update.sh >--- rkhunter.orig/files/check_update.sh 2004-08-20 16:05:43.000000000 +0100 >+++ rkhunter/files/check_update.sh 2005-04-25 17:51:23.000000000 +0100 >@@ -52,15 +52,11 @@ > { > echo -n "${FILEDESC}: " > UPDATEDBURL="${FIRSTMIRROR}/${VERSIONUPDATEURL}" >- ${WGETBINARY} -q -O /tmp/rkhunter.upd ${UPDATEDBURL} >- >- if [ -f /tmp/rkhunter.upd ]; then >- LATESTVERSION=`cat /tmp/rkhunter.upd` >- rm -f /tmp/rkhunter.upd >- else >+ >+ if ! LATESTVERSION=`${WGETBINARY} -q -O - ${UPDATEDBURL}`; then > echo "ERROR" > echo "Fatal error: Problem while fetching file" >- exit 1 >+ exit 1 > fi > > CURRENTVERSION=`cat ${DBDIR}/${FILENAME} | grep '000:version' | cut -d ':' -f3` >@@ -89,12 +85,9 @@ > > # Fetch file > GETFILE="${FIRSTMIRROR}/${FILENAME}.gz" >- ${WGETBINARY} -q -O /tmp/rkhunter.upd.gz ${GETFILE} >- if [ $? -eq 0 ] >- then >- # Gunzip it and place it on the right location >- gunzip /tmp/rkhunter.upd.gz >- mv /tmp/rkhunter.upd ${DBDIR}/${FILENAME} >+ TMPFILE="`mktemp /tmp/rkhunter.upd.gz.XXXXXX`" || exit 1 >+ if ${WGETBINARY} -q -O - ${GETFILE} | gunzip -c > ${TMPFILE}; then >+ mv ${TMPFILE} ${DBDIR}/${FILENAME} > echo " Action: Database updated (current version: ${CURRENTVERSION}, new version ${LATESTVERSION})" > else > echo "Fatal error: Can't retrieve file: ${GETFILE}" >@@ -126,10 +119,6 @@ > rm -f ${MIRRORFILE}.new > fi > >- if [ -f /tmp/rkhunter.upd ]; then >- rm -f /tmp/rkhunter.upd >- fi >- > touch ${MIRRORFILE}.new > echo "${MIRRORSVERSION}" > ${MIRRORFILE}.new > for I in ${OTHERMIRRORS}; do >diff -ruN rkhunter.orig/files/rkhunter rkhunter/files/rkhunter >--- rkhunter.orig/files/rkhunter 2005-02-21 18:32:08.000000000 +0000 >+++ rkhunter/files/rkhunter 2005-04-25 17:47:48.000000000 +0100 >@@ -4421,16 +4421,16 @@ > VERSION=`${I}/php -v | head -n 1 | awk '{ print $2 }'` > ;; > procmail) >- 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` >+ VERSION=`${I}/procmail -v 2>&1 | grep 'procmail v' | awk '{ print $2 }' | tr -d 'v'` > ;; > proftpd) >- VERSION=`${I}/proftpd -v 2> /tmp/proftpd.txt && cat /tmp/proftpd.txt | awk '{ print $4 }' && rm -f /tmp/proftpd.txt` >+ VERSION=`${I}/proftpd -v 2>&1 | awk '{ print $4 }'` > ;; > squid) > VERSION=`${I}/squid -v | grep 'Squid Cache' | awk '{ print $4 }'` > ;; > sshd) >- 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` >+ VERSION=`${I}/sshd -t -d 2>&1 | head -n 1 | awk '{ print $4 }' | cut -d '_' -f2` > if [ ! "`echo "${VERSION}" | grep "+"`" = "" ]; then > VERSION=`echo "${VERSION}" | cut -d'+' -f1` > fi
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 90007
: 57197