Julio Maidanik said:
>
>
> Dennis Peterson wrote:
>> Stephen Gran said:
>>> On Thu, Aug 18, 2005 at 04:00:19PM +0200, Marc Haber said:
>>>> Hi,
>>>>
>>>> the clamd docs say quite clearly that it is necessary to either send
>>>> the RELOAD command to the daemon or to send SIGUSR2 to the daemon to
>>>> have it reload the database.
>>>>
>>>> However, the VERSION command and clamdscan -V report the new
>>>> database version immediately after putting the new databases in
>>>> place.
>>>
>>> OK, I have been thinking about this a little more, and it looks to me
>>> like the simplest thing may be to add an element to the cl_node root
>>> struct containing version information.
>>
>> If I were king and could set priorities and someone has dev cycles to
>> burn I'm much rather see a control channel added to clamd that
>> listens on a separate port from the data port (3311, 'fristance).
>> This new control port would be a tcp socket only and could be bound
>> to the loopback interface or to a network interface, and it would
>> allow queries from tools such as Big Brother, Big Sister, Auntie Em,
>> or Network Node Manager, what ever.
>>
>
> I believe you are wrong: clamd socket, when  specified in clamd.conf is
> for
> control only.
> When a client, like clamdscan wants to pass data to clamd uses either a
> temporary file or a socket (in case clamdscan input is stdin).
> At least, that is what I conclude from the logs.
>
> Julio Maidanik

Ok - so here's what I did. Configured clamd to use a Unix socket. This
requires you disable the TCP socket option - can't have both. Wrote a perl
tool that connects to that socket and sends it the location of a file I
wish to scan. Works great, fast, efficient, etc, just like you'd expect
from a Unix socket vs a TCP socket. But now I have no remote way test the
daemon as I do when it is using a TCP socket. My interest is to have a TCP
control socket available for simple tasks such as reporting status,
version, etc., when clamd is configured to use a Unix socket.

Now I can write a simple perl listener that will accept a TCP connection
from inetd and send the query to the local Unix socket but that seems a
bit messy, and frankly, a hack. I can also write a Big Brother extension
that runs locally and reports the health too, but yet another hack.

One solution would be to allow either a Unix socket, or a TCP socket, or
both at the same time.

dp
_______________________________________________
http://lurker.clamav.net/list/clamav-users.html

Reply via email to