diff options
author | 2001-09-29 01:13:16 +0000 | |
---|---|---|
committer | 2001-09-29 01:13:16 +0000 | |
commit | 9a4ccf841e652c7112e51ead897422c11261ef99 (patch) | |
tree | 59314751eded49846e6aca14643e4e63173f08d5 | |
parent | Put $TF in double-quotes since it could possibly contain spaces; (diff) | |
download | wireguard-openbsd-9a4ccf841e652c7112e51ead897422c11261ef99.tar.xz wireguard-openbsd-9a4ccf841e652c7112e51ead897422c11261ef99.zip |
Don't sleep for 5 secs and then remove the temp dir and contents as
this is raceable; solar@openwall.com
-rw-r--r-- | gnu/usr.bin/gzip/gzexe | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gnu/usr.bin/gzip/gzexe b/gnu/usr.bin/gzip/gzexe index 1a86c2d95b2..e2a977eb0c6 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.5 2001/09/27 23:54:58 millert Exp $ +# $OpenBSD: gzexe,v 1.6 2001/09/29 01:13:16 millert Exp $ x=`basename "$0"` if test $# = 0; then @@ -83,13 +83,12 @@ for i do if test $decomp -eq 0; then sed 1q "$0" > $tmp sed "s|^if tail|if $tail|" >> $tmp <<'EOF' -skip=15 +skip=14 tmpdir=`/usr/bin/mktemp -d /tmp/gzexeXXXXXXXXXX` || exit 1 prog="${tmpdir}/`echo \"$0\" | sed 's|^.*/||'`" if tail +$skip "$0" | gzip -cd > "$prog"; then chmod 700 "$prog" trap '/bin/rm -rf $tmpdir exit $res' 0 - (/bin/sleep 5; /bin/rm -rf $tmpdir) 2>/dev/null & "$prog" ${1+"$@"}; res=$? else echo Cannot decompress $0 |