Thoughts on how to communicate to VFS functions that a CREATE is occurring

Volker Lendecke Volker.Lendecke at SerNet.DE
Sat Apr 2 21:05:36 UTC 2016


On Sat, Apr 02, 2016 at 08:00:27AM -0700, Richard Sharpe wrote:
> Hi folks,
> 
> There are times in VFS functions where we want to know that the
> current call was made from a CREATE vs other paths (like
> GET_DFS_REFERRAL etc...)
> 
> This allows the VFS modules to do interesting things.
> 
> We now have a flags field in the struct smb_filename structure and one
> obvious thing we could do is to add an SMB_FILENAME_CREATE_PATH flag
> and set it in unix_convert.
> 
> However, this has some problems. One is that it would have to be reset
> somewhere and secondly there are some VFS functions that are not
> passed a struct smb_filename that might want to know we are in the
> create path. Indeed, they might want to know whether they were called
> for a CREATE, a GETINFO or whatever.
> 
> Perhaps the best approach is to have a field in the VFS handle that
> indicates what request is being processed.
> 
> Is there an easier way to handle this?

Can you describe your highlevel requirement -- why do you
need to know this?

Volker

-- 
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 mailing list