Developing a VFS module
omnikron
omnikron at free.fr
Tue May 3 19:29:37 GMT 2005
Hi,
I am developing a VFS module to log some informations and I need some help !
I want to log who connect or disconnect to a service (a share) in an
sqlite database.
I don't have any problem to log connections :
{SMB_VFS_OP(inra_connect), SMB_VFS_OP_CONNECT, SMB_VFS_LAYER_LOGGER}
static int inra_connect(
vfs_handle_struct *handle,
connection_struct *conn,
const char *service,
const char *user);
I can easily get who opened the connection with "const char *user" and
get on which service he connected with "const char *service".
For disconnection events, I have one particular problem : get the
service name from which the user disconnected.
{SMB_VFS_OP(inra_disconnect), SMB_VFS_OP_DISCONNECT, SMB_VFS_LAYER_LOGGER}
static void inra_disconnect(
vfs_handle_struct *handle,
connection_struct *conn);
I can get his username by "conn->user", but could you tell me how obtain
the service name. I found and "int service" in connection_struct of
vfs.h but this is an integer, so I think thi is not what I want.
Thanks in advance to help me, it would be great for me.
--
Julien Thomas
More information about the samba-technical
mailing list