weird mailscanner clamd error

Rick Cooper rcooper at dwford.com
Thu Jan 6 17:25:06 GMT 2011


Naz Snidanko wrote:
> I just checked:
> 
> /opt/MailScanner-4.82.3-1/lib/MailScanner/MessageBatch.pm
> 
> I am using 4.82.3-1 and this modification is there. It does not solve
> the problem. I haven't tried running clamd under root since it would
> violate our security principles.
> 
> Are you guys sure it is not a problem with clamd itself? Clamav
> doesn't get this error.

Actually the more I looked at this, I believe the code in Message.pm
beginning at line 3348 that reads

    # Untaint member's attributes.
    $member->unixFileAttributes(0600);

Should be

    # Untaint member's attributes.
	my $workperms = MailScanner::Config::Value('workperms') || '0600';
    $member->unixFileAttributes($workperms);
For some reason it appears Julian forced the extracted files to 0600 in the
original code. The change I have listed above would set them to what ever
the mailscanner config has for the work permissions or 600 if no value
exists.

Julian any comment?


Rick

> 
> Regards,
> 
> Naz Snidanko
> Desktop & Network Support
> Harper Power Products Inc.
> (p) 416 201- 7506
>  nsnidanko at harperpowerproducts.com
> 
> -----Original Message-----
> From: mailscanner-bounces at lists.mailscanner.info
> [mailto:mailscanner-bounces at lists.mailscanner.info] On Behalf Of
> Iulian L Dragomir
> Sent: January 6, 2011 6:05 AM
> To: MailScanner discussion
> Subject: Re: weird mailscanner clamd error
> 
> On Thu, Jan 6, 2011 at 12:24 PM, Randal, Phil
> <prandal at herefordshire.gov.uk> wrote:
>> The only workaround I've found is to run clamd as root.
>> 
>> 
>> 
>> I've seen the same issue with MailScanner / sendmail on CentOS.
> 
> If it is the same problem then try this:
> 
> http://lists.mailscanner.info/pipermail/mailscanner/2010-April/095611.ht
> ml
> --
> MailScanner mailing list
> mailscanner at lists.mailscanner.info
> http://lists.mailscanner.info/mailman/listinfo/mailscanner
> 
> Before posting, read http://wiki.mailscanner.info/posting
> 
> Support MailScanner development - buy the book off the website!
> --
> MailScanner mailing list
> mailscanner at lists.mailscanner.info
> http://lists.mailscanner.info/mailman/listinfo/mailscanner
> 
> Before posting, read http://wiki.mailscanner.info/posting
> 
> Support MailScanner development - buy the book off the website!



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




More information about the MailScanner mailing list