Creating directories is a lesser citizen in Samba and the VFS ...

Volker Lendecke Volker.Lendecke at SerNet.DE
Thu Feb 19 02:45:00 MST 2015


On Wed, Feb 18, 2015 at 08:09:52PM -0800, Richard Sharpe wrote:
> I notice that create_file_unixpath handles directories and files
> through different paths.
> 
> Files are handled through open_file_ntcreate and it is passed a newly
> created FSP which is passed all the way down to fd_open_atomic while
> directories are handled in open_directory, which is expected to create
> an FSP and hand it back.
> 
> open_directory does not create the FSP before calling mkdir_internal
> so it is very hard for a VFS module to tag directories FSPs with an
> FSP extension.
> 
> One way I can think to improve this might be to allow mkdir_internal
> to return, via a parameter, an FSP extension. This could be added as
> an additional parameter to the SMB_VFS_MKDIR VFS function.
> 
> Does that sound like a reasonable way to provide the ability to tag
> directories at create time? The alternative would be to create the FSP
> before mkdir_internal is called and pass the FSP down the line.

If you ask me, I'd prefer the second solution. With a very
brief look at open_directory and open_file_ntcreate my
impression is that we need to merge the two more.

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