vfs_shadow_copy: handle non-existant files and wildcards
commit3157af9bfdfa2d5e476f86ff930758b0b0180a98
authorUri Simchoni <uri@samba.org>
Wed, 24 Aug 2016 11:42:23 +0000 (24 14:42 +0300)
committerStefan Metzmacher <metze@samba.org>
Sun, 28 Aug 2016 16:12:12 +0000 (28 18:12 +0200)
tree09fbe337734e636b680f0ec7175f49a2b74f9798
parent8f535d5055f95de71437c90c276cab083e611020
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