[PATCH] smbd: Fix snapshot query on shares with DFS enabled

Jeremy Allison jra at samba.org
Wed Aug 17 20:55:04 UTC 2016


On Wed, Aug 17, 2016 at 11:33:21PM +0300, Uri Simchoni wrote:
> On 08/17/2016 11:23 PM, Jeremy Allison wrote:
> > On Wed, Aug 17, 2016 at 01:19:11PM -0700, Jeremy Allison wrote:
> >>
> >> Ah ok - that's the missing piece ! I'd prefer the /server/share/path/to/file/@GMT-xxx
> >> approach as that prevents us having to mess understand when we have
> >> a DFS vs. regular path.
> >>
> >> I'm assuming the above also works with Windows ? I'm having
> >> trouble on my W2K12R2 box getting @GMT paths to work with SMB1.
> > 
> > Ah ! Yes it does. Just found in MS-SMB:
> > 
> > -----------------------------------------------------------------
> > 2.2.1.1.1 Pathname Extensions
> > 
> > Pathnames are allowed to contain a previous version token (or @GMT token), as a directory
> > element in a path. A previous version token indicates that the pathname is a request to access the
> > previous version (or shadow copy) of the file or directory at a particular point in time. This feature
> > is available on any path-based operation (for example, SMB_COM_NT_CREATE_ANDX). A pathname
> > MUST NOT contain more than one previous version token.
> > For example, requesting a previous version of the file \\server\mydocs\reviews\feb01.doc at
> > 2:44:00 P.M. on March30, 2001 UTC is specified in the following format:
> > \\server\mydocs\reviews\@GMT-2001.03.30-14.44.00\feb01.doc
> > The same technique can be used to build a path that represents a previous version of a directory as
> > opposed to a file.
> > For example, requesting a previous version of the directory \\server\mydocs\reviews at 2:44:00 PM
> > on 3/30/01 UTC can be specified in either of the following formats:
> > A token appearing as an intermediate path component:
> > 
> > \\server\mydocs\@GMT-2001.03.30-14.44.00\reviews
> > 
> > A token appearing as a final path component:
> > 
> > \\server\mydocs\reviews\@GMT-2001.03.30-14.44.00
> > -----------------------------------------------------------------
> > 
> *as a directory element* ...

The last component *Is* a directory element :-). The long
and the short of it is, does this work against Windows ?

Right now I can't get SMB1 @GMT- components to work against
a Win2K12 server. An SMB1 cli_shadow_copy_data() call returns an empty
list, but an SMB2 cli_shadow_copy_data() (with my patch)
can see them.

Any idea what I'm missing ?



More information about the samba-technical mailing list