summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorRalph Boehme <slow@samba.org>2018-11-22 11:02:24 +0100
committerRalph Boehme <slow@samba.org>2018-11-27 07:13:13 +0100
commit87bf06ed790dad8a4f650c0cd1b6781864666cbf (patch)
treea86daf4e3621e1412f83416df469e49b257efb25 /source3
parent12778f015988f7e8755016c72c26939998758dae (diff)
downloadsamba-87bf06ed790dad8a4f650c0cd1b6781864666cbf.tar.gz
vfs_shadow_copy2: add _already_converted arg to shadow_copy2_strip_snapshot_internal()
Not used for now, all existing callers pass NULL. Bug: https://bugzilla.samba.org/show_bug.cgi?id=13688 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/modules/vfs_shadow_copy2.c32
1 files changed, 24 insertions, 8 deletions
diff --git a/source3/modules/vfs_shadow_copy2.c b/source3/modules/vfs_shadow_copy2.c
index 79c1ee5cf33..9d49ce77064 100644
--- a/source3/modules/vfs_shadow_copy2.c
+++ b/source3/modules/vfs_shadow_copy2.c
@@ -587,7 +587,8 @@ static bool shadow_copy2_strip_snapshot_internal(TALLOC_CTX *mem_ctx,
const char *orig_name,
time_t *ptimestamp,
char **pstripped,
- char **psnappath)
+ char **psnappath,
+ bool *_already_converted)
{
struct tm tm;
time_t timestamp = 0;
@@ -608,6 +609,10 @@ static bool shadow_copy2_strip_snapshot_internal(TALLOC_CTX *mem_ctx,
DEBUG(10, (__location__ ": enter path '%s'\n", name));
+ if (_already_converted != NULL) {
+ *_already_converted = false;
+ }
+
abs_path = make_path_absolute(mem_ctx, priv, name);
if (abs_path == NULL) {
ret = false;
@@ -630,6 +635,9 @@ static bool shadow_copy2_strip_snapshot_internal(TALLOC_CTX *mem_ctx,
}
if (already_converted) {
+ if (_already_converted != NULL) {
+ *_already_converted = true;
+ }
goto out;
}
@@ -759,6 +767,7 @@ static bool shadow_copy2_strip_snapshot(TALLOC_CTX *mem_ctx,
orig_name,
ptimestamp,
pstripped,
+ NULL,
NULL);
}
@@ -1119,12 +1128,14 @@ static int shadow_copy2_rename(vfs_handle_struct *handle,
if (!shadow_copy2_strip_snapshot_internal(talloc_tos(), handle,
smb_fname_src->base_name,
- &timestamp_src, NULL, &snappath_src)) {
+ &timestamp_src, NULL, &snappath_src,
+ NULL)) {
return -1;
}
if (!shadow_copy2_strip_snapshot_internal(talloc_tos(), handle,
smb_fname_dst->base_name,
- &timestamp_dst, NULL, &snappath_dst)) {
+ &timestamp_dst, NULL, &snappath_dst,
+ NULL)) {
return -1;
}
if (timestamp_src != 0) {
@@ -1163,7 +1174,8 @@ static int shadow_copy2_symlink(vfs_handle_struct *handle,
link_contents,
&timestamp_old,
NULL,
- &snappath_old)) {
+ &snappath_old,
+ NULL)) {
return -1;
}
if (!shadow_copy2_strip_snapshot_internal(talloc_tos(),
@@ -1171,7 +1183,8 @@ static int shadow_copy2_symlink(vfs_handle_struct *handle,
new_smb_fname->base_name,
&timestamp_new,
NULL,
- &snappath_new)) {
+ &snappath_new,
+ NULL)) {
return -1;
}
if ((timestamp_old != 0) || (timestamp_new != 0)) {
@@ -1202,7 +1215,8 @@ static int shadow_copy2_link(vfs_handle_struct *handle,
old_smb_fname->base_name,
&timestamp_old,
NULL,
- &snappath_old)) {
+ &snappath_old,
+ NULL)) {
return -1;
}
if (!shadow_copy2_strip_snapshot_internal(talloc_tos(),
@@ -1210,7 +1224,8 @@ static int shadow_copy2_link(vfs_handle_struct *handle,
new_smb_fname->base_name,
&timestamp_new,
NULL,
- &snappath_new)) {
+ &snappath_new,
+ NULL)) {
return -1;
}
if ((timestamp_old != 0) || (timestamp_new != 0)) {
@@ -1566,7 +1581,8 @@ static int shadow_copy2_chdir(vfs_handle_struct *handle,
smb_fname->base_name,
&timestamp,
&stripped,
- &snappath)) {
+ &snappath,
+ NULL)) {
return -1;
}
if (stripped != NULL) {