MajorSophos

Spicer, Kevin Kevin.Spicer at BMRB.CO.UK
Wed Sep 8 09:59:39 IST 2004


>MajorSophos uses mktemp for the TMPDIR initialization, but mktemp isn't
>very portable (at least not to Solaris 8).  Here's what I did:
>around line 99-101, I changed:
>         TMPDIR=`mktemp -d -q /tmp/$BASE.XXXXXX`
>to:
>          TMPDIR="/tmp/$BASE.$$"
>          mkdir -m 700 $TMPDIR
>($$ is "unique enough", considering the directory is short-lived, and
>process numbers are unique)

Process numbers may be unique but they are predictable, therefore should
not be used for creating temporary files and directories.
Perhaps a better solution may be...

TMPDIR= `perl -e "use File::Temp tempdir; print (tempdir( 'BASE.XXXXXX',
TMPDIR => 1))"`

(excuse the wrapping of the line)

File::Temp is a standard perl module so this should work on any system
with perl - which is kinda necessary for MailScanner ;)




BMRB International 
http://www.bmrb.co.uk
+44 (0)20 8566 5000
_________________________________________________________________
This message (and any attachment) is intended only for the 
recipient and may contain confidential and/or privileged 
material.  If you have received this in error, please contact the 
sender and delete this message immediately.  Disclosure, copying 
or other action taken in respect of this email or in 
reliance on it is prohibited.  BMRB International Limited 
accepts no liability in relation to any personal emails, or 
content of any email which does not directly relate to our 
business.

------------------------ MailScanner list ------------------------
To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
'leave mailscanner' in the body of the email.
Before posting, read the MAQ (http://www.mailscanner.biz/maq/) and
the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).



More information about the MailScanner mailing list