The branch, master has been updated via 639063d s3: vfs: shadow_copy2. Remove any trailing slash when stripping @GMT-YYYY... from the end of a path. via 6245f2c s3: vfs: shadow_copy2: Re-use an existing variable already set to the right value (p - name). from b2bf613 idmap: centrally check that unix IDs returned by the idmap backends are in range
https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 639063da8c5077170bfe2dc4d3a69c3219a4f6a1 Author: Jeremy Allison <j...@samba.org> Date: Tue Aug 16 09:43:37 2016 -0700 s3: vfs: shadow_copy2. Remove any trailing slash when stripping @GMT-YYYY... from the end of a path. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12150 Signed-off-by: Jeremy Allison <j...@samba.org> Reviewed-by: Christof Schmitt <c...@samba.org> Autobuild-User(master): Jeremy Allison <j...@samba.org> Autobuild-Date(master): Wed Aug 17 05:25:30 CEST 2016 on sn-devel-144 commit 6245f2c042da55c71086e1d40186b11964ddeba8 Author: Jeremy Allison <j...@samba.org> Date: Tue Aug 16 09:41:43 2016 -0700 s3: vfs: shadow_copy2: Re-use an existing variable already set to the right value (p - name). BUG: https://bugzilla.samba.org/show_bug.cgi?id=12150 Signed-off-by: Jeremy Allison <j...@samba.org> Reviewed-by: Christof Schmitt <c...@samba.org> ----------------------------------------------------------------------- Summary of changes: source3/modules/vfs_shadow_copy2.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) Changeset truncated at 500 lines: diff --git a/source3/modules/vfs_shadow_copy2.c b/source3/modules/vfs_shadow_copy2.c index bda934e..4ac16d3 100644 --- a/source3/modules/vfs_shadow_copy2.c +++ b/source3/modules/vfs_shadow_copy2.c @@ -486,7 +486,15 @@ static bool shadow_copy2_strip_snapshot(TALLOC_CTX *mem_ctx, * with a path prefix. */ if (pstripped != NULL) { - stripped = talloc_strndup(mem_ctx, name, p - name); + if (len_before_gmt > 0) { + /* + * There is a slash before + * the @GMT-. Remove it. + */ + len_before_gmt -= 1; + } + stripped = talloc_strndup(mem_ctx, name, + len_before_gmt); if (stripped == NULL) { return false; } -- Samba Shared Repository