scannedonly vfs module ported to samba 3.5
Olivier Sessink
oliviersessink at gmail.com
Sun Dec 6 13:00:38 MST 2009
Hi all,
latest version is at:
http://scannedonly.svn.sourceforge.net/viewvc/scannedonly/branches/samba3.5compat/src/vfs_scannedonly.c?view=markup
I've implemented/fixed all remarks, except for:
> connect_to_scanner: We have the routine open_socket_out() in
> lib/util_sock.c that does pretty much what you do here.
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...?
then a question:
> Then the active_files[1024] array in struct Tscannedonly: My
> impression is that these are used to notify the scanner at
> close time. Is that right? If so, you can't restrict that to
> 1024, we have to deal with many more file descriptors. Then,
> with your "memset(so->activefiles, 0, 1024);" you don't
> initialize the whole array if that was your intention.
> 1024*sizeof(char *) would have been right I think.
>
> If my assumption about its purpose (use it at close time) is
> right, then you don't need the array at all: We have the
> fsp->fsp_name available in the vfs_close call that you might
> want to access.
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?
> You can keep your own copyright. Our only restriction is
> that it must be personal and not corporate.
I'm doing this in my spare time, my employer is not involved.
thanks
Olivier
More information about the samba-technical
mailing list