scannedonly vfs module ported to samba 3.5

Olivier Sessink oliviersessink at gmail.com
Tue Dec 8 07:47:53 MST 2009


Thanks, implemented that.

A last question (I think): I currently use a global static variable
gsendbuffer which holds  filesnames that are to be sent to the virus
scanner. This assumes that a single samba process works on one share
(different share definitions might use different virus scanners).

Is this assumption correct?

Is the use of a global static variable correct?

Olivier

2009/12/7 Jeremy Allison <jra at samba.org>:
> On Mon, Dec 07, 2009 at 03:12:32PM +0100, Volker Lendecke wrote:
>> On Mon, Dec 07, 2009 at 02:59:02PM +0100, Olivier Sessink wrote:
>> > this makes the code a lot easier indeed. However, only need to notify
>> > the anti-virus scanner if the file was opened in write or read/write
>> > mode. Is that also accessible somewhere during file close?
>>
>> fsp->access_mask ?
>
> It's easier than that :-).
>
> fsp->can_read == true means it was open for read.
> fsp->can_write = true means it was open for write.
>
> Just use these as a bitmask to re-create O_RONLY,
> O_WRONLY and O_RDWR.
>
> Jeremy.
>


More information about the samba-technical mailing list