diff options
author | Kevin Dalley <kevin@seti.org> | 1998-03-20 16:24:10 +0000 |
---|---|---|
committer | Kevin Dalley <kevin@seti.org> | 1998-03-20 16:24:10 +0000 |
commit | fb374265f72162e47c451a9d62c5eac0d58a9982 (patch) | |
tree | ef5ae342f7c7b3fffa2ba0a4f67dd1d1b45050ff | |
parent | e695747e8e13501001a8096267b5559611708404 (diff) | |
download | findutils-fb374265f72162e47c451a9d62c5eac0d58a9982.tar.gz |
Modifications made to updatedb to avoid dangerous use of $$.FINDUTILS_4_1-28
updatedb is now using tempfile
-rw-r--r-- | debian/changelog | 6 | ||||
-rw-r--r-- | locate/updatedb.sh | 10 |
2 files changed, 12 insertions, 4 deletions
diff --git a/debian/changelog b/debian/changelog index 85a3d715..ba874296 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +findutils (4.1-28) frozen unstable; urgency=low + + * use tempfile for extra safety (fixes bug #19791) + + -- Kevin Dalley <kevind@rahul.net> Thu, 19 Mar 1998 00:37:28 -0800 + findutils (4.1-27) unstable; urgency=low * add --existing option to locate, which only prints the names of files diff --git a/locate/updatedb.sh b/locate/updatedb.sh index 7c17ef4f..5be474f7 100644 --- a/locate/updatedb.sh +++ b/locate/updatedb.sh @@ -68,8 +68,10 @@ test -z "$PRUNEREGEX" && # Directory to hold intermediate files. if test -d /var/tmp; then : ${TMPDIR=/var/tmp} -else +elif test -d /usr/tmp; then : ${TMPDIR=/usr/tmp} +else + : ${TMPDIR=/tmp} fi # The user to search network directories as. @@ -144,9 +146,9 @@ fi else # old -bigrams=$TMPDIR/f.bigrams$$ -filelist=$TMPDIR/f.list$$ -rm -f $bigrams $filelist $LOCATE_DB.n +bigrams=`tempfile -p updatedb` +filelist=`tempfile -p updatedb` +rm -f $LOCATE_DB.n trap 'rm -f $bigrams $filelist $LOCATE_DB.n; exit' 1 15 # Alphabetize subdirectories before file entries using tr. James says: |