Unrar Patches

Rick Cooper rcooper at DWFORD.COM
Fri Mar 4 01:26:55 GMT 2005

    [ The following text is in the "iso-8859-1" character set. ]
    [ Your display is set for the "US-ASCII" character set.  ]
    [ Some characters may be displayed incorrectly. ]


I have attached the two patches needed to do the unrar handling. I have
tested them with various rar files and forced time outs and everything seems
fine. Hopefully I have them commented well enough for you to "get them"
without wondering why this or that was done.

They also include the code for handling the duplicate filename problem but
that code is noted and commented out. I also took the liberty of moving that
annoying "RAR Module failure" message into the info section of the
parseclamavmodule section (since about every rar close to modern is going to
cause it). There is a line (95) in the Message.pm.diff file that had me
puzzled because it was in the patch I sent last year that allowed the
reports to separate the problems in the report.txt. I noticed the items were
still in languages.txt but I am not sure if you did something else with the
code so if that shouldn't be there now please comment it out or remove it.

There are also a couple of changes to the SafePipe sub, I noticed while
running in debug that an error popped up regarding SIGALARM not being a
valid parameter so I added "use POSIX qw(:signal_h);" just before the eval.
I also open STDIN to /dev/null in the child before the exec. Leaving STDIN
alone did cause problems in certain cases and might have something to do
with the Solaris problem you noted, I can't test that.

Last odd thing I noted, while running in debug mode, is a bunch of "
uninitialized value" errors that revolved around the use of f-prot version
checking, every instance of $tnefname =
$message->{entity2file}{$message->{tnefentity}} and
$top->head->mime_attr('content-disposition'). I fixed them while I was
testing but removed the fixes before creating the diff files. I don't know
if you noticed them or not but they occurred with every test message I sent
that had an attachment. I doubt that they are causing any problems, just
extra noise when you are debugging.


 Rick Cooper

This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

------------------------ 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).

Support MailScanner development - buy the book off the website!

    [ Part 2, Application/X-GZIP  8KB. ]
    [ Unable to print this part. ]

More information about the MailScanner mailing list