The Samba-Bugzilla – Attachment 17869 Details for
Bug 15358
shadow_copy2 and streams_depot don't play well together
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for 4.17
bug-15358-4.17.txt (text/plain), 1.90 KB, created by
Volker Lendecke
on 2023-04-18 07:52:16 UTC
(
hide
)
Description:
Patch for 4.17
Filename:
MIME Type:
Creator:
Volker Lendecke
Created:
2023-04-18 07:52:16 UTC
Size:
1.90 KB
patch
obsolete
>From 6b6e427c0578f2dc0a3c01f9bb1387e0c9694be9 Mon Sep 17 00:00:00 2001 >From: Volker Lendecke <vl@samba.org> >Date: Fri, 14 Apr 2023 17:22:18 +0200 >Subject: [PATCH] shadow_copy2: Fix stream open for streams_depot paths > >streams_depot hands us absolute paths with : filename components >instead of having set smb_fname_in->stream_name. > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=15358 > >Signed-off-by: Volker Lendecke <vl@samba.org> >Reviewed-by: Jeremy Allison <jra@samba.org> > >Autobuild-User(master): Jeremy Allison <jra@samba.org> >Autobuild-Date(master): Mon Apr 17 18:11:07 UTC 2023 on atb-devel-224 > >(cherry picked from commit 526f381f413d1cb5cde93b9542034f5ebfcfcc10) >--- > source3/modules/vfs_shadow_copy2.c | 25 ++++++++++++++++--------- > 1 file changed, 16 insertions(+), 9 deletions(-) > >diff --git a/source3/modules/vfs_shadow_copy2.c b/source3/modules/vfs_shadow_copy2.c >index a3a6afbc3ac..db221655a3e 100644 >--- a/source3/modules/vfs_shadow_copy2.c >+++ b/source3/modules/vfs_shadow_copy2.c >@@ -1521,15 +1521,22 @@ static struct smb_filename *shadow_copy2_openat_name( > if (fsp->base_fsp != NULL) { > struct smb_filename *base_fname = fsp->base_fsp->fsp_name; > >- SMB_ASSERT(is_named_stream(smb_fname_in)); >- >- result = synthetic_smb_fname( >- mem_ctx, >- base_fname->base_name, >- smb_fname_in->stream_name, >- &smb_fname_in->st, >- smb_fname_in->twrp, >- smb_fname_in->flags); >+ if (smb_fname_in->base_name[0] == '/') { >+ /* >+ * Special-case stream names from streams_depot >+ */ >+ result = cp_smb_filename(mem_ctx, smb_fname_in); >+ } else { >+ >+ SMB_ASSERT(is_named_stream(smb_fname_in)); >+ >+ result = synthetic_smb_fname(mem_ctx, >+ base_fname->base_name, >+ smb_fname_in->stream_name, >+ &smb_fname_in->st, >+ smb_fname_in->twrp, >+ smb_fname_in->flags); >+ } > } else { > result = full_path_from_dirfsp_atname( > mem_ctx, dirfsp, smb_fname_in); >-- >2.30.2 >
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 15358
:
17868
| 17869