Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ClamAV: devel

clamav-milter changes

 

 

ClamAV devel RSS feed   Index | Next | Previous | View Threaded


jmaimon at ttec

Apr 7, 2004, 11:09 PM

Post #1 of 2 (542 views)
Permalink
clamav-milter changes

I see in CVS we are now tracking number of bytes written to clamd
socket. It would probaly be a whole lot easier (and more accurate) if
clamfi_send actualy returned number of bytes written or -1 on error.

Additionaly clamfi_send can potentialy write less than the user expects
with truncation happening on a formatted string which expand to a larger
size than BUFSIZ which is the array size sent to vsnprintf. Reporting
number of bytes written could help with that too.

Joe.


jmaimon at ttec

Apr 9, 2004, 9:02 AM

Post #2 of 2 (540 views)
Permalink
Re: clamav-milter changes [In reply to]

Joe Maimon wrote:

> I see in CVS we are now tracking number of bytes written to clamd
> socket. It would probaly be a whole lot easier (and more accurate) if
> clamfi_send actualy returned number of bytes written or -1 on error.
>
> Additionaly clamfi_send can potentialy write less than the user
> expects with truncation happening on a formatted string which expand
> to a larger size than BUFSIZ which is the array size sent to
> vsnprintf. Reporting number of bytes written could help with that too.
>
> Joe.
>
I hope I am not being a pain, but I am tracking this in CVS and it looks
like a mess.

Please please tell me what is wrong with doing things this way.

- clamd scans up to maxlength and closes socket.
- clamfi_send tracks the number of bytes written and honours StreamMaxLength
- clamfi_send will ignore StreamMaxLength if we are using a quarantine
dir (cause we are not streaming)
- clamfi_send return number of bytes written or -1 on error
- clamav-milter will not overrun clamd streammaxlength
- clamav-milter will mark as cleann all too large attachments that were
clean up to StreamMaxLength
- clamav-milter will detect viruses in attachments that are larger than
StreamMaxLength so long as the virus is before StreamMaxLength
- privdata->envid is used to stor $i from sendmail

Attached are patches agains CVS head. They work for me (last ten minutes)
Attachments: clamd-stream-maxsizenoreturn.devel-jm.patch (1.99 KB)
  clamav-milter.streammaxlength.devel-jm.patch (5.67 KB)

ClamAV devel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.