The Samba copy file call flow
Volker.Lendecke at SerNet.DE
Fri May 2 02:08:59 MDT 2014
On Thu, May 01, 2014 at 11:52:12AM +0800, GongJinrong wrote:
> I found that if I enable a vfs object(such as full_audit), I can see the
> write_file() print log, but if I don't enable any VFS object, I cannot find
> the file data write operations, can you tell me how samba store a file to
> disk without VFS object? Where is the real file write code?
It's in source3/smbd/vfs.c, lines 456 and following. From
there it goes into source3/modules/vfs_default.c, line 610
and following. From there it goes into
source3/lib/system.c, line 141. In 146 we have a pwrite
system call. From there it is the C system library and on
most implementations it will be some kind of system call.
But beyond the call to the function pwrite it is essentially
out of Samba's hands and in the hands of someone else.
With best regards,
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de
More information about the samba-technical