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)
committerKarolin Seeger <kseeger@samba.org>
Wed, 21 Sep 2016 09:15:08 +0000 (11:15 +0200)
commit180a0342f3ed2211020e65d11a8bf494b197ac17
tree22a33605bad2428d39d604bf999814d5802dc6a7
parentcbdb72fbf2e6bf022db8b9006e2d764e6cbb2ff1
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
(cherry picked from commit f41f439335efb352d03a842c370212a0af77262a)
selftest/knownfail
source3/modules/vfs_shadow_copy2.c