1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-24 13:57:43 +03:00

s3: VFS: Allow shadow_copy2_connectpath() to return the cached path derived from $cwd.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
This commit is contained in:
Jeremy Allison 2017-01-20 12:09:08 -08:00
parent 27340df4b5
commit 42bd1acad7

View File

@ -2335,9 +2335,19 @@ static const char *shadow_copy2_connectpath(struct vfs_handle_struct *handle,
char *parent_dir = NULL;
int saved_errno;
size_t rootpath_len = 0;
struct shadow_copy2_private *priv = NULL;
SMB_VFS_HANDLE_GET_DATA(handle, priv, struct shadow_copy2_private,
return NULL);
DBG_DEBUG("Calc connect path for [%s]\n", fname);
if (priv->shadow_connectpath != NULL) {
DBG_DEBUG("cached connect path is [%s]\n",
priv->shadow_connectpath);
return priv->shadow_connectpath;
}
if (!shadow_copy2_strip_snapshot(talloc_tos(), handle, fname,
&timestamp, &stripped)) {
goto done;