summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--etc/daily7
-rw-r--r--gnu/usr.bin/gzip/gzexe7
-rw-r--r--libexec/spamd/spamd-setup.sh7
-rw-r--r--sys/kern/genassym.sh7
-rw-r--r--usr.bin/locate/locate/mklocatedb.sh9
-rw-r--r--usr.bin/lorder/lorder.sh7
-rw-r--r--usr.bin/spell/spell.ksh7
7 files changed, 36 insertions, 15 deletions
diff --git a/etc/daily b/etc/daily
index dc6f8a87fb6..933352e3424 100644
--- a/etc/daily
+++ b/etc/daily
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $OpenBSD: daily,v 1.41 2002/12/07 20:16:19 millert Exp $
+# $OpenBSD: daily,v 1.42 2003/02/08 10:19:30 pvalchev Exp $
# From: @(#)daily 8.2 (Berkeley) 1/25/94
#
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin
@@ -13,7 +13,10 @@ if [ -f /etc/daily.local ]; then
fi
TMP=`mktemp /tmp/_daily.XXXXXX` || exit 1
-OUT=`mktemp /tmp/_security.XXXXXX` || exit 1
+OUT=`mktemp /tmp/_security.XXXXXX` || {
+ rm -f ${TMP}
+ exit 1
+}
trap 'rm -f $TMP $OUT' 0 1 15
diff --git a/gnu/usr.bin/gzip/gzexe b/gnu/usr.bin/gzip/gzexe
index e2a977eb0c6..65bbf252902 100644
--- a/gnu/usr.bin/gzip/gzexe
+++ b/gnu/usr.bin/gzip/gzexe
@@ -12,7 +12,7 @@
# The : is required for some old versions of csh.
# On Ultrix, /bin/sh is too buggy, change the first line to: #!/bin/sh5
#
-# $OpenBSD: gzexe,v 1.6 2001/09/29 01:13:16 millert Exp $
+# $OpenBSD: gzexe,v 1.7 2003/02/08 10:19:30 pvalchev Exp $
x=`basename "$0"`
if test $# = 0; then
@@ -84,7 +84,10 @@ for i do
sed 1q "$0" > $tmp
sed "s|^if tail|if $tail|" >> $tmp <<'EOF'
skip=14
-tmpdir=`/usr/bin/mktemp -d /tmp/gzexeXXXXXXXXXX` || exit 1
+tmpdir=`/usr/bin/mktemp -d /tmp/gzexeXXXXXXXXXX` || {
+ rm -f ${tmp}
+ exit 1
+}
prog="${tmpdir}/`echo \"$0\" | sed 's|^.*/||'`"
if tail +$skip "$0" | gzip -cd > "$prog"; then
chmod 700 "$prog"
diff --git a/libexec/spamd/spamd-setup.sh b/libexec/spamd/spamd-setup.sh
index 7a2be7876d6..94d804b19b6 100644
--- a/libexec/spamd/spamd-setup.sh
+++ b/libexec/spamd/spamd-setup.sh
@@ -1,6 +1,6 @@
#!/bin/sh
-# $OpenBSD: spamd-setup.sh,v 1.4 2003/01/22 01:38:10 deraadt Exp $
+# $OpenBSD: spamd-setup.sh,v 1.5 2003/02/08 10:19:30 pvalchev Exp $
#
# Copyright (c) 2002 Theo de Raadt. All rights reserved.
#
@@ -47,7 +47,10 @@ fetch() {
}
R=`mktemp /tmp/_spamdXXXXXX` || exit 1
-W=`mktemp /tmp/_spamwXXXXXX` || exit 1
+W=`mktemp /tmp/_spamwXXXXXX` || {
+ rm -f ${R}
+ exit 1
+}
trap "rm -f $R $W; exit 0" 0
trap "rm -f $R $W; exit 1" 1 2 3 13 15
diff --git a/sys/kern/genassym.sh b/sys/kern/genassym.sh
index 51272b677b8..f5579d4d535 100644
--- a/sys/kern/genassym.sh
+++ b/sys/kern/genassym.sh
@@ -1,4 +1,4 @@
-# $OpenBSD: genassym.sh,v 1.8 2002/02/21 02:49:18 miod Exp $
+# $OpenBSD: genassym.sh,v 1.9 2003/02/08 10:19:30 pvalchev Exp $
# $NetBSD: genassym.sh,v 1.9 1998/04/25 19:48:27 matthias Exp $
#
@@ -44,7 +44,10 @@ else
fi
TMPC=`mktemp /tmp/genassym_c.XXXXXX` || exit 1
-TMP=`mktemp /tmp/genassym.XXXXXX` || exit 1
+TMP=`mktemp /tmp/genassym.XXXXXX` || {
+ rm -f ${TMPC}
+ exit 1
+}
trap "rm -f $TMPC $TMP" 0 1 2 3 15
$awk '
diff --git a/usr.bin/locate/locate/mklocatedb.sh b/usr.bin/locate/locate/mklocatedb.sh
index 157a39ba002..1e6f85e581a 100644
--- a/usr.bin/locate/locate/mklocatedb.sh
+++ b/usr.bin/locate/locate/mklocatedb.sh
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $OpenBSD: mklocatedb.sh,v 1.8 2002/10/04 17:33:45 millert Exp $
+# $OpenBSD: mklocatedb.sh,v 1.9 2003/02/08 10:19:30 pvalchev Exp $
#
# Copyright (c) September 1995 Wolfram Schneider <wosch@FreeBSD.org>. Berlin.
# All rights reserved.
@@ -30,7 +30,7 @@
#
# usage: mklocatedb [-presort] < filelist > database
#
-# $Id: mklocatedb.sh,v 1.8 2002/10/04 17:33:45 millert Exp $
+# $Id: mklocatedb.sh,v 1.9 2003/02/08 10:19:30 pvalchev Exp $
# The directory containing locate subprograms
@@ -60,7 +60,10 @@ esac
bigrams=`mktemp ${TMPDIR=/tmp}/_bigrams.XXXXXXXXXX` || exit 1
trap 'rm -f $bigrams' 0 1 2 3 5 10 15
-filelist=`mktemp ${TMPDIR=/tmp}/_filelist.XXXXXXXXXX` || exit 1
+filelist=`mktemp ${TMPDIR=/tmp}/_filelist.XXXXXXXXXX` || {
+ rm -f ${bigrams}
+ exit 1
+}
trap 'rm -f $bigrams $filelist' 0 1 2 3 5 10 15
if $sortcmd $sortopt > $filelist; then
diff --git a/usr.bin/lorder/lorder.sh b/usr.bin/lorder/lorder.sh
index 3d5a2517cfc..fda74c756bf 100644
--- a/usr.bin/lorder/lorder.sh
+++ b/usr.bin/lorder/lorder.sh
@@ -1,5 +1,5 @@
#!/bin/sh -
-# $OpenBSD: lorder.sh,v 1.11 2001/06/29 01:33:23 pvalchev Exp $
+# $OpenBSD: lorder.sh,v 1.12 2003/02/08 10:19:30 pvalchev Exp $
# $NetBSD: lorder.sh.gnm,v 1.3 1995/12/20 04:45:11 cgd Exp $
#
# Copyright (c) 1990, 1993
@@ -48,7 +48,10 @@ esac
# temporary files
R=`mktemp /tmp/_referenceXXXXXX` || exit 1
-S=`mktemp /tmp/_symbolXXXXXX` || exit 1
+S=`mktemp /tmp/_symbolXXXXXX` || {
+ rm -f ${R}
+ exit 1
+}
# remove temporary files on HUP, INT, QUIT, PIPE, TERM
trap "rm -f $R $S; exit 0" 0
diff --git a/usr.bin/spell/spell.ksh b/usr.bin/spell/spell.ksh
index 532ef88e28c..6ce7eedcb28 100644
--- a/usr.bin/spell/spell.ksh
+++ b/usr.bin/spell/spell.ksh
@@ -1,6 +1,6 @@
#!/bin/ksh -
#
-# $OpenBSD: spell.ksh,v 1.3 2002/11/27 01:18:34 margarida Exp $
+# $OpenBSD: spell.ksh,v 1.4 2003/02/08 10:19:30 pvalchev Exp $
#
# Copyright (c) 2001 Todd C. Miller <Todd.Miller@courtesan.com>
# All rights reserved.
@@ -72,7 +72,10 @@ while test "${argv[$OPTIND]#+}" = "${argv[$OPTIND]}" && \
;;
t) DEROFF="detex"
;;
- v) VTMP=`mktemp /tmp/spell.XXXXXXXX` || exit 1
+ v) VTMP=`mktemp /tmp/spell.XXXXXXXX` || {
+ rm -f ${TMP}
+ exit 1
+ }
FLAGS[${#FLAGS[@]}]="-v"
FLAGS[${#FLAGS[@]}]="-o"
FLAGS[${#FLAGS[@]}]="$VTMP"