summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2013-05-23 16:21:46 +0200
committerAndrew Bartlett <abartlet@samba.org>2013-10-05 09:21:17 +1300
commitdbdb436a80e2fb75d9fd8ae17192702123c3b530 (patch)
tree2e663fdc059d4cceddfa9d4d4a9f2ae1787c1207 /source3
parentea898ea1ac1cc9364c5b7396db3902aeb114cfb8 (diff)
downloadsamba-dbdb436a80e2fb75d9fd8ae17192702123c3b530.tar.gz
samba-dbdb436a80e2fb75d9fd8ae17192702123c3b530.tar.bz2
samba-dbdb436a80e2fb75d9fd8ae17192702123c3b530.zip
shadow_copy2: in the classical case, use configured path in shadow_copy2_find_snapdir()
There is no point in searching for snapdir if not in snapdirseverywhere mode. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/modules/vfs_shadow_copy2.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source3/modules/vfs_shadow_copy2.c b/source3/modules/vfs_shadow_copy2.c
index 9462187362..952b010acf 100644
--- a/source3/modules/vfs_shadow_copy2.c
+++ b/source3/modules/vfs_shadow_copy2.c
@@ -1047,6 +1047,13 @@ static char *shadow_copy2_find_snapdir(TALLOC_CTX *mem_ctx,
SMB_VFS_HANDLE_GET_DATA(handle, config, struct shadow_copy2_config,
return NULL);
+ /*
+ * If the non-snapdisrseverywhere mode, we should not search!
+ */
+ if (!config->snapdirseverywhere) {
+ return config->snapshot_basepath;
+ }
+
path = talloc_asprintf(mem_ctx, "%s/%s",
handle->conn->connectpath,
smb_fname->base_name);