VFS module in Samba 3.0 (read and write files doesn't work)

Alejandro Sánchez Acosta asanchez at opensistemas.com
Tue Jul 13 07:47:47 GMT 2004


Hello,

I'm making a VFS module for Samba 3.0 and I intercept at this moment the
connect/disconnect/open/close calls.

If I try to intercept the read and write calls, I don't register
anything. In almost all situations I usually use syslog to register the
messages in the /var/log/messages.

I think is because all the files are mapped in memory, so the regions
are protected with PROT_READ and PROT_WRITE and that is the reason
because I can't intercept that calls.

I know I can disable mmap in Samba, but is going to affect in the
performance.

The reason because I intercept reads and writes is only because I want
to know if you are reading or writting a file with Samba, so I don't
know if it is a better way to do it.

Any clue?

P.D: I don't know if I have to intercept other calls to know if you are
reading or writting a file, like sendfile(), pread() or pwrite().

Thanks in advance,
Alejandro.



More information about the samba-technical mailing list