]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: VFS: shadow_copy2: Add a wrapper function to call the original shadow_copy2_strip...
authorJeremy Allison <jra@samba.org>
Fri, 20 Jan 2017 19:54:56 +0000 (11:54 -0800)
committerKarolin Seeger <kseeger@samba.org>
Wed, 15 Feb 2017 10:42:22 +0000 (11:42 +0100)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12531

Allows an extra (currently unused) parameter to be added.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
(backported from commit 5aa1ea95157475dfd2d056f0158b14b2b90895a9)

source3/modules/vfs_shadow_copy2.c

index 83566450df6fdc00d25a4a6b63b4b632fdbf2e54..111ea0348b32a351b3bb59dc871561e70662a8fa 100644 (file)
@@ -224,11 +224,12 @@ static char *shadow_copy2_snapshot_path(TALLOC_CTX *mem_ctx,
  * handed in via the smb layer.
  * Returns the parsed timestamp and the stripped filename.
  */
-static bool shadow_copy2_strip_snapshot(TALLOC_CTX *mem_ctx,
+static bool shadow_copy2_strip_snapshot_internal(TALLOC_CTX *mem_ctx,
                                        struct vfs_handle_struct *handle,
                                        const char *name,
                                        time_t *ptimestamp,
-                                       char **pstripped)
+                                       char **pstripped,
+                                       char **psnappath)
 {
        struct tm tm;
        time_t timestamp = 0;
@@ -402,6 +403,20 @@ no_snapshot:
        return true;
 }
 
+static bool shadow_copy2_strip_snapshot(TALLOC_CTX *mem_ctx,
+                                       struct vfs_handle_struct *handle,
+                                       const char *orig_name,
+                                       time_t *ptimestamp,
+                                       char **pstripped)
+{
+       return shadow_copy2_strip_snapshot_internal(mem_ctx,
+                                       handle,
+                                       orig_name,
+                                       ptimestamp,
+                                       pstripped,
+                                       NULL);
+}
+
 static char *shadow_copy2_find_mount_point(TALLOC_CTX *mem_ctx,
                                           vfs_handle_struct *handle)
 {