Creating directories is a lesser citizen in Samba and the VFS ...
realrichardsharpe at gmail.com
Wed Feb 18 21:09:52 MST 2015
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
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.
More information about the samba-technical