The Samba-Bugzilla – Attachment 13165 Details for
Bug 12743
vfs_shadow_copy2 fails to list snapshots from shares with GlusterFS backend
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
git-am fix for 4.6.next, 4.5.next.
l1 (text/plain), 3.70 KB, created by
Jeremy Allison
on 2017-04-20 23:32:39 UTC
(
hide
)
Description:
git-am fix for 4.6.next, 4.5.next.
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2017-04-20 23:32:39 UTC
Size:
3.70 KB
patch
obsolete
>From 279604d53755d2b89873fa3a87cba6b1137ba092 Mon Sep 17 00:00:00 2001 >From: Michael Adam <obnox@samba.org> >Date: Tue, 11 Apr 2017 11:18:30 +0200 >Subject: [PATCH 1/3] s3:vfs:shadow_copy2: fix quoting in debug messages > >Signed-off-by: Michael Adam <obnox@samba.org> >Reviewed-by: Jeremy Allison <jra@samba.org> >(cherry picked from commit fffd611fdc558ab428c8a21cf1e68feaf1f6f469) >--- > source3/modules/vfs_shadow_copy2.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/source3/modules/vfs_shadow_copy2.c b/source3/modules/vfs_shadow_copy2.c >index 2afc5954e7d..f3ec8b61ab5 100644 >--- a/source3/modules/vfs_shadow_copy2.c >+++ b/source3/modules/vfs_shadow_copy2.c >@@ -684,7 +684,7 @@ static bool shadow_copy2_strip_snapshot_internal(TALLOC_CTX *mem_ctx, > if (make_relative_path(priv->shadow_cwd, > stripped) == false) { > DEBUG(10, (__location__ ": path '%s' " >- "doesn't start with cwd '%s\n", >+ "doesn't start with cwd '%s'\n", > stripped, priv->shadow_cwd)); > ret = false; > errno = ENOENT; >@@ -726,7 +726,7 @@ static bool shadow_copy2_strip_snapshot_internal(TALLOC_CTX *mem_ctx, > if (make_relative_path(priv->shadow_cwd, > stripped) == false) { > DEBUG(10, (__location__ ": path '%s' " >- "doesn't start with cwd '%s\n", >+ "doesn't start with cwd '%s'\n", > stripped, priv->shadow_cwd)); > ret = false; > errno = ENOENT; >-- >2.12.2.816.g2cccc81164-goog > > >From c2b2febc98a8fa9d1e1ae30ea27d2a8e85164a0a Mon Sep 17 00:00:00 2001 >From: Michael Adam <obnox@samba.org> >Date: Tue, 11 Apr 2017 12:03:20 +0200 >Subject: [PATCH 2/3] s3:vfs:shadow_copy2: fix the corner case if cwd=/ in > make_relative_path > >Signed-off-by: Michael Adam <obnox@samba.org> >Reviewed-by: Jeremy Allison <jra@samba.org> >(cherry picked from commit 16c89835cf07caa2082b586666095deba38ef962) >--- > source3/modules/vfs_shadow_copy2.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > >diff --git a/source3/modules/vfs_shadow_copy2.c b/source3/modules/vfs_shadow_copy2.c >index f3ec8b61ab5..83be84e50a8 100644 >--- a/source3/modules/vfs_shadow_copy2.c >+++ b/source3/modules/vfs_shadow_copy2.c >@@ -444,7 +444,11 @@ static bool make_relative_path(const char *cwd, char *abs_path) > if (memcmp(abs_path, cwd, cwd_len) != 0) { > return false; > } >- if (abs_path[cwd_len] != '/' && abs_path[cwd_len] != '\0') { >+ /* The cwd_len != 1 case is for $cwd == '/' */ >+ if (cwd_len != 1 && >+ abs_path[cwd_len] != '/' && >+ abs_path[cwd_len] != '\0') >+ { > return false; > } > if (abs_path[cwd_len] == '/') { >-- >2.12.2.816.g2cccc81164-goog > > >From 9fbfb8e1cc0559842017a6692350593835f23df5 Mon Sep 17 00:00:00 2001 >From: Michael Adam <obnox@samba.org> >Date: Tue, 11 Apr 2017 12:03:52 +0200 >Subject: [PATCH 3/3] s3:vfs:shadow_copy2: fix corner case of "/@GMT-token" in > shadow_copy2_strip_snapshot > >Signed-off-by: Michael Adam <obnox@samba.org> >Reviewed-by: Jeremy Allison <jra@samba.org> >(cherry picked from commit 26661218b3d3f0d4ee89039727bc110e972c2851) >--- > source3/modules/vfs_shadow_copy2.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > >diff --git a/source3/modules/vfs_shadow_copy2.c b/source3/modules/vfs_shadow_copy2.c >index 83be84e50a8..7cacac81c1c 100644 >--- a/source3/modules/vfs_shadow_copy2.c >+++ b/source3/modules/vfs_shadow_copy2.c >@@ -671,10 +671,11 @@ static bool shadow_copy2_strip_snapshot_internal(TALLOC_CTX *mem_ctx, > * with a path prefix. > */ > if (pstripped != NULL) { >- if (len_before_gmt > 0) { >+ if (len_before_gmt > 1) { > /* >- * There is a slash before >- * the @GMT-. Remove it. >+ * There is a path (and not only a slash) >+ * before the @GMT-. Remove the trailing >+ * slash character. > */ > len_before_gmt -= 1; > } >-- >2.12.2.816.g2cccc81164-goog >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
slow
:
review+
Actions:
View
Attachments on
bug 12743
:
13153
| 13165