VFS method opening a file

Mrinal Kalakrishnan lists at mrinal.net
Tue Jan 11 14:03:10 GMT 2005


I'm having a bit of trouble with the Samba 3 VFS system. I'm
implementing an open method, in which I want to open the local file,
write some data to it, close it, then act like a transparent open.

If I use SMB_VFS_NEXT_OPEN to open the file the first time, I don't
have the necessary files_struct *fsp which is needed to call
SMB_VFS_NEXT_WRITE. I tried using the open_file method in smbd/open.c,
but that's not linked with the vfs module.

(Instead of using SMB_VFS_NEXT_OPEN, I could use open() and write()
directly, but that's a hack, and that'll be bypassing any other VFS
modules which might be below the current one).

Has anybody done this, or can someone tell me the correct way to go
about doing this?

Thanks in advance.

Mrinal Kalakrishnan  || http://mrinal.net/ || PGP:B1E86F5B ||
<mail at mrinal.net> || JabberID: <mrinal at myjabber.net> ||

More information about the samba-technical mailing list