including samba vfs module scannedonly in source tree

Olivier Sessink oliviersessink at
Sun Nov 22 05:00:54 MST 2009

Volker Lendecke wrote:
> On Tue, Nov 17, 2009 at 04:45:25PM +0100, Olivier Sessink wrote:
>> The last years I have developed and maintained a samba VFS module called
>> scannedonly, for anti-virus integration. Fore more information check out:
>> It is in production use on several sites.
>> The current download compiles against samba 3.0, 3.2, and 3.4. Because
>> it requires the full samba source code it is not trivial to install.
>> The Samba VFS module is actually quite small (766 lines), what would it
>> take to include this code in samba ?
> One reason why we don't have a virus scanning module inside
> Samba is that it is license-wise not possible to link in
> proprietary modules. Even clamav being GPLv2 only is
> difficult. But your module seems to not link to that, it
> just talks to a daemon via a unix domain socket, right?

that is correct, I've tried to keep the VFS module as simple and generic
as possible, it only uses a domain socket or it talks over UDP.

> If that's the case, it would license-wise be possible to get
> the module upstream.
> Some comments:
> No struct typedefs, please. Just added this to README.Coding :-)
> No lines > 80 columns please.

I wasn't aware of the README.Coding, I will correct the coding style.

> The VFS interface for master/3.5 has changed. I would expect
> the module to require some changes here. We would not
> release another 3.2-3.4 for this new feature.

Where can I find the new interface documentation?

> The getcwd() can be very, very expensive. We have a cache
> for that. Look at vfs_GetWd().

thanks for the tip, I'll look into that

> flush_sendbuffer() seems a bit problematic. It does not take
> care of EINTR properly, and it does not send the rest if not
> all was written. Likewise notify_scanner(). You might want
> to take a look at our write_data() function.

I'll do.

> This is from a quick look, I would have to take a closer
> look at the logic in a second step.

ok, I'll first correct these first pointers and send a corrected vfs module.


More information about the samba-technical mailing list