s3: VFS: shadow_copy2: Ensure pathnames for parameters are correctly relative and...
authorJeremy Allison <jra@samba.org>
Fri, 20 Jan 2017 19:45:54 +0000 (11:45 -0800)
committerJeremy Allison <jra@samba.org>
Mon, 30 Jan 2017 17:39:18 +0000 (18:39 +0100)
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>
source3/modules/vfs_shadow_copy2.c

index ed98dd4f8ae2cee8c5d3bcd178278c5fd4db2212..41d2a1fc875ff805e00d21b44149524efc67b8fd 100644 (file)
@@ -2626,6 +2626,11 @@ static int shadow_copy2_connect(struct vfs_handle_struct *handle,
                }
        }
 
+       trim_string(config->mount_point, NULL, "/");
+       trim_string(config->rel_connectpath, "/", "/");
+       trim_string(config->snapdir, NULL, "/");
+       trim_string(config->snapshot_basepath, NULL, "/");
+
        DEBUG(10, ("shadow_copy2_connect: configuration:\n"
                   "  share root: '%s'\n"
                   "  mountpoint: '%s'\n"