Sorry for double posting.

Dennis Peterson wrote:
> Nathan Brink wrote:
>    
>> Dennis Peterson wrote:
>>      
>>> Pardon a bit of thread hijacking but...
>>>
>>>        

>>> Developers - could you unify the names of these sockets and invocation 
>>> method?
>>>
>>>    From clamd.conf:
>>> LocalSocket /var/run/clamav/clamd.sock
>>> TCPSocket 3310
>>> TCPAddr 127.0.0.1
>>>
>>>    From clamav-milter.conf:
>>> ClamdSocket /var/run/clamav/clamd.sock (this is wrong, BTW)
>>> ClamdSocket tcp:127.0.0.1:3310
>>>
>>>        
>> I hope I have correctly interpreted your request; if I have, I like your
>> idea. clamd.conf should accept multiple Listening socket lines (maybe
>> with a Listen directive, which makes sense since other programs use this
>> terminology). This might look like:
>> #clamd.conf:
>> Listen unix:/var/run/clamav/clamd.sock
>> Listen tcp:localhost:3310
>> Listen tcp:*:3333
>>
>> #clamav-milter.conf:
>> ClamdSocket unix:/var/run/clamav/clamd.sock
>> ClamdSocket tcp:localhost:3310
>> ClamdSocket tcp:remotehost:3333
>>      
> Not quite what I had in mind. The same socket has two different names 
> depending
> on which conf file you read:
>
> Listen and ClamdSocket. Call it Listen or call it ClamdSocket, but not both.
>
> There are two different invocations:
> TCPSocket 3310
> TCPAddr xx.xx.xx.xx
>
> and
>
> ClamdSocket tcp:host:socket
>
> Again, go with one or the other. For example, change clamd.conf to:
> ClamdSocket tcp:host:socket
>
> or change clamav-milter.conf to:
> Listen tcp:localhost:3310
> Listen tcp:*:3333
>    
I'm afraid you or I have confused the meanings of ClamdSocket in 
clamav-milter.conf and my proposed Listen keyword for clamd.conf. The 
ClamdSocket entries in clamav-milter.conf refer to ports that clamd 
listens to and that clamav-milter should _connect_ to, not Listen to. 
It'd make sense to use ``ClamdSocket'' in clamav-milter.conf to refer to 
clamds the milter should connect to. I think it also makes sense to 
recognize that the clamd daemon is Listen-ing on the unix: and tcp: 
sockets. If the clamav-milter is to have a Listen keyword, it would be 
for incoming libmilter connections.
> A rose by any other name may still be a rose, but config file contents are not
> so conveniently self-identifying. This identity creep can only produce 
> confusion.
>    
I'd hope that two separate logical operations would get different 
configuration-option names as happens currently. Listening for 
connections and making connections differ, including the code for either 
action. However, I'm guessing clamav devs will keep the names unique 
enough to avoid confusion.
But at least we agree on supporting the unix ``URI'' format for 
specifying a unix socket in clamd.conf to match the ClamdSocket option 
in clamav-milter.conf... I think. Changing keyword names is probably a 
bad idea, except that it's easier to change the format of a config 
option if the name of that config option is changed at the same time.

-- 
binki

_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://www.clamav.net/support/ml

Reply via email to