scannedonly vfs module ported to samba 3.5

Volker Lendecke Volker.Lendecke at SerNet.DE
Sun Dec 6 14:18:50 MST 2009


On Sun, Dec 06, 2009 at 09:23:26PM +0100, Olivier Sessink wrote:
>> On Sun, Dec 06, 2009 at 09:00:38PM +0100, Olivier Sessink wrote:
>>> I now use open_udp_socket() for the UDP mode, but I don't see a 
>>> function to open to an existing unix domain socket in DGRAM mode...?
>>
>> Ok, right. I don't think we have a function for that. But to
>> be honest -- why UDP and/or DGRAM?
>
> 1) connection reliability is not important in the design - if a file is  
> not yet scanned for viruses, a request for scanning is always sent or  
> re-sent (and the daemon is designed to handle that). It is thus not an  
> issue if a request does not arrive - it will be requested again.
>
> 2) only short messages (filenames) are sent to the anti-virus scanner.  
> Each single message easily fits into a datagram (I do pack multiple  
> messages when possible to avoid a too-large burst of messages).
>
> thus --> The design does not require STREAM or TCP --> using DGRAM  
> results in very simple code and very little overhead.

Ok. That's up to you. I consider TCP to be vastly easier to
use than UDP though.

I had not noticed that you are using a DGRAM socket. In that
light, I would really say that flush_sendbuffer() needs
fixing. How do you want to deal with packets lost between
smbd and the virus scanner? The local process might have
given you the okay, but somewhere on the way to the server
process this might get lost. Your server process might get a
little more complex, but I really think that's worth it.

I would not block getting your module in over this, but I
think for more heavy workloads this needs adapting.

Volker
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20091206/a9f067d5/attachment.pgp>


More information about the samba-technical mailing list