$OpenBSD: patch-lib_clamav-wrapper,v 1.4 2013/12/12 21:56:19 brad Exp $
--- lib/clamav-wrapper.orig	Sat Aug 20 08:32:02 2011
+++ lib/clamav-wrapper	Wed Dec 11 18:30:49 2013
@@ -52,7 +52,6 @@
 # You may want to check this script for bash-isms
 
 #TempDir="/tmp/clamav.$$"
-TempDir=$(mktemp) || { echo "$0: Cannot make name for temporary dir" >&2; exit 1; }
 ClamUser="clamav"
 ClamGroup="clamav"
 
@@ -99,23 +98,23 @@ ExtraScanOptions=""
 # LESS COMMON unpackers, which probably aren't installed by default
 # (hence disabled)
 # Uncomment ONE of the following lines if you have unrar installed
-#ExtraScanOptions="$ExtraScanOptions --unrar"  
+ExtraScanOptions="$ExtraScanOptions --unrar"  
 #ExtraScanOptions="$ExtraScanOptions --unrar=/path/to/unrar" 
 
 # Uncomment ONE of the following lines if you have unarj installed
-#ExtraScanOptions="$ExtraScanOptions --unarj"  
+ExtraScanOptions="$ExtraScanOptions --unarj"  
 #ExtraScanOptions="$ExtraScanOptions --unarj=/path/to/unarj" 
 
 # Uncomment ONE of the following lines if you have unace installed
-#ExtraScanOptions="$ExtraScanOptions --unace"  
+ExtraScanOptions="$ExtraScanOptions --unace"  
 #ExtraScanOptions="$ExtraScanOptions --unace=/path/to/unace" 
 
 # Uncomment ONE of the following lines if you have lha installed
-#ExtraScanOptions="$ExtraScanOptions --lha"  
+ExtraScanOptions="$ExtraScanOptions --lha"  
 #ExtraScanOptions="$ExtraScanOptions --lha=/path/to/lha" 
 
 # Uncomment ONE of the following lines if you have zoo installed
-#ExtraScanOptions="$ExtraScanOptions --zoo"  
+ExtraScanOptions="$ExtraScanOptions --zoo"  
 #ExtraScanOptions="$ExtraScanOptions --zoo=/path/to/unzoo" 
 
 # Now increase the allowed expansion size of zip files
@@ -140,14 +139,10 @@ fi
 PATH=$PATH:/usr/ucb
 export PATH
 
-# Check if the tmpdir exists, if so delete so we start with a clean slate
-if [ -x "${TempDir}" ]; then
-	rm -rf ${TempDir} >/dev/null 2>&1
-fi
 
 # Make the Temp dir
 umask 0077
-mkdir "${TempDir}" >/dev/null 2>&1
+TempDir=$(mktemp -d) || { echo "$0: Cannot create temporary dir" >&2; exit 1; }
 
 # In case we get interupted....
 trap "rm -rf ${TempDir}" EXIT
