Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 08 Dec 2004 11:39:23 -0600
From:      Gordon Burditt <gordon@burditt.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        gordon@burditt.org
Subject:   ports/74857: clamav socket problem 
Message-ID:  <E1Cc5md-000IkE-Nb@hammy.burditt.org>
Resent-Message-ID: <200412081740.iB8HeBQM079406@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         74857
>Category:       ports
>Synopsis:       clamav socket problem
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Dec 08 17:40:11 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Gordon Burditt
>Release:        FreeBSD 4.9-STABLE i386
>Organization:
>Environment:
System: FreeBSD hammy.burditt.org 4.9-STABLE FreeBSD 4.9-STABLE #7: Sat Nov 22 14:13:11 CST 2003 gordon@hammy.burditt.org:/scratch5/i386-obj/usr/src/sys/HAMMY i386


	
	FreeBSD 4.9, clamav port 0.80_1

>Description:
	
	When used with Exim, clamd repeatedly reports "client disconnected",
	while Exim reports it is unable to read from the socket
	(no such file or directory).  Some scanning is done properly,
	though.

>How-To-Repeat:
	
	I just used the same setup with Exim and exiscan to scan
	mail through clamd that I have used previously with clamav 0.74,
	which did not show the problem.
>Fix:

	
	The problem appears to be is_fd_connected(), which is
	falsely indicating the socket is disconnected, causing clamd
	to emit the "client disconnected" message, and it closes the
	socket, causing Exim to complain about reading the response back.

	I stuck a "return 1;" in is_fd_connected() so it ALWAYS returns 1.
	This fixed the problem.  Obviously it is not a very clean fix.

	Note:  clamav-config.h has HAVE_POLL defined as 1 and HAVE_POLL_H
	undefined, so is_fd_connected() is using the select() version
	of the code.

					Gordon L. Burditt
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1Cc5md-000IkE-Nb>