jmaimon at ttec
Apr 9, 2004, 9:02 AM
Post #2 of 2
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.
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)