rene.klomp at os3.nl
Fri Nov 16 07:48:09 MST 2012
I am developing a VFS module that modifies certain files in a specific
way that can be different each time that file is opened
To do this I want to use an external script that takes a file as input
and then changes it and writes those changes to a temporary file. The
temporary file then has to be served to the client.
How could I best do this?
I tried the following:
static int my_vfs_open(vfs_handle_struct *handle, struct smb_filename
files_struct *fsp, int flags, mode_t mode)
return open("test2.txt", flags, mode);
return SMB_VFS_NEXT_OPEN(handle, smb_fname, fsp, flags, mode);
This works, but it is not possible to open a file outside the current
share directory... So I wont be able to let a script write a file to
another directory so that it wont be visible in the share.
Another thing I thought about was piping the output of the external
script to the user. That would probably be more efficient? Is that
possible? If yes, how?
I hope someone can help me in the right direction.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 551 bytes
Desc: OpenPGP digital signature
More information about the samba-technical