[Samba] VFS : Replacing file during open()

Hachi nutt at geotechnik.rwth-aachen.de
Tue Sep 21 04:36:26 MDT 2010

i think i solved my problem.

i change the filename right before calling SMB_VFS_NEXT_OPEN
so Samba creates the file where i want it to be.
after calling i create the symlink and everything works fine

Am 16.09.2010 14:35, schrieb Hachi:
> hello,
> i have samba 3.5.4 on a debian (testing)
> i wrote a vfs-module, which (during the open()) moves a file on another
> disc in my server and places a symbolic link instead
> example:
> /samba/foo.bar
> becomes
> /samba/foo.bar -> /other/disc/foo.bar
> compiling and using from a pc through samba is no problem, except for
> editing a file, that was just created and not closed yet
> i guess, the file-descriptor defined in the files_struct is illegal
> after replacing the original file (as the inode changed)
> so can i open the moved file and exchange the file-descriptor, or do you
> have other ideas to solve this?

More information about the samba mailing list