Patch: Fixed patch for moving RSVD/SHVXD to vfs_default

Michael Adam obnox at
Wed Aug 5 21:11:45 UTC 2015

On 2015-08-05 at 13:41 -0700, Richard Sharpe wrote:
> On Wed, Aug 5, 2015 at 11:42 AM, Michael Adam <obnox at> wrote:
> > On 2015-08-04 at 21:56 +0200, Ralph Böhme wrote:
> >> On Tue, Aug 04, 2015 at 12:06:38PM -0700, Richard Sharpe wrote:
> >> > On Tue, Aug 4, 2015 at 11:25 AM, Michael Adam <obnox at> wrote:
> >> > > Wait a minute ... the vfs should not be fiddling
> >> > > with smb2 create contexts! IMHO, this belongs into
> >> > > smb2_create.c and nowhere else.
> >> >
> >> > Why? These are the same as Extra Create Parameters in Windows and they
> >> > belong in NTFS, AFAICT.
> >> >
> >> > In addition, we already pass these to the VFS layer, and why should we
> >> > have to add code to the SMB layer for each new ECP/Create Context
> >> > Microsoft adds?
> >>
> >> iirc it was me who added the create contexts to
> >> SMB_VFS_CREATE_FILE(). Makes sense to me.
> >
> > Oh, I didn't realize that. This is awful from a software layering
> > point of view (just in my humble and possibly naive opinion...).
> > These create contexts belong to the SMB level. The VFS represents
> > the virtual NT file system layer. Some of the create contexts may
> > represent things that need to have an effect to the vfs layer.
> > In that case, I'd say we need to provide something special.
> I think you are wrong here. Create Contexts are mapped from Extra
> Create Paramaters on Windows, and they can come from userland on
> Windows:
> Here is a list of ECPs that originate above the redirector:

This is about programming device drivers. I don't quite
understand how exactly this matches. But two comments:

1. _mapped - you say it: we should not blindly hand SMB stuff
   down, but map only what's needed. (IMHO).

2. You are referring here to the way the redirector gets
   extra data from driver or userland into the SMB client's
   call of the smb create function.
   But the code of the patch is the part where the smb server
   takes the smb create call and prepares data to stuff into
   the local FS create call. This is different.

> Notice that last one!

Yeah, the app instance id. This is a good example
because it should on the server side only be used at the
smb level. It should never hit the file system is my understanding.

You could convince me more if you showed me the place in the
documentation where the SMB contexts are handed into the
local windows api call for create_file. ... :-)

Cheers - Michael

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <>

More information about the samba-technical mailing list