vfs_shadow_copy: handle non-existant files and wildcards
authorUri Simchoni <uri@samba.org>
Wed, 24 Aug 2016 11:42:23 +0000 (14:42 +0300)
committerJeremy Allison <jra@samba.org>
Thu, 25 Aug 2016 03:35:29 +0000 (05:35 +0200)
commitf41f439335efb352d03a842c370212a0af77262a
treee2af0569c81e301a514ed152c070a873c216e675
parent22c3982100a1d6bf67979a0659604942ef6f11f0
vfs_shadow_copy: handle non-existant files and wildcards

During path checking, the vfs connectpath_fn is called to
determine the share's root, relative to the file being
queried (for example, in snapshot file this may be other
than the share's "usual" root directory). connectpath_fn
must be able to answer this question even if the path does
not exist and its parent does exist. The convention in this
case is that this refers to a yet-uncreated file under the parent
and all queries are relative to the parent.

This also serves as a workaround for the case where connectpath_fn
has to handle wildcards, as with the case of SMB1 trans2 findfirst.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12172

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Aug 25 05:35:29 CEST 2016 on sn-devel-144
selftest/knownfail
source3/modules/vfs_shadow_copy2.c