The Samba-Bugzilla – Attachment 18194 Details for
Bug 15505
following intermediate abolute share-local symlinks is broken
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
fix for 4.19 branch
0001-smbd-Fix-read_symlink_reparse.patch (text/plain), 1.62 KB, created by
Björn Jacke
on 2023-12-06 12:07:11 UTC
(
hide
)
Description:
fix for 4.19 branch
Filename:
MIME Type:
Creator:
Björn Jacke
Created:
2023-12-06 12:07:11 UTC
Size:
1.62 KB
patch
obsolete
>From c0492a46bb4b9a3d5069120adfbb668eab7dd650 Mon Sep 17 00:00:00 2001 >From: Volker Lendecke <vl@samba.org> >Date: Thu, 26 Oct 2023 16:12:29 +0200 >Subject: [PATCH] smbd: Fix read_symlink_reparse() > >Bug: https://bugzilla.samba.org/show_bug.cgi?id=15505 > >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): Fri Oct 27 21:19:35 UTC 2023 on atb-devel-224 > >(cherry picked from commit 952d6c2cf48b19807e96a49b95c19c224bd6e732) >--- > source3/smbd/files.c | 14 +++++++++++--- > 1 file changed, 11 insertions(+), 3 deletions(-) > >diff --git a/source3/smbd/files.c b/source3/smbd/files.c >index 9dcab463d3b..b8640fd6677 100644 >--- a/source3/smbd/files.c >+++ b/source3/smbd/files.c >@@ -754,11 +754,19 @@ NTSTATUS read_symlink_reparse( > } > > if (symlink->substitute_name[0] == '/') { >- const char *connectpath = dirfsp->conn->connectpath; >+ char *subdir_path = NULL; > char *abs_target_canon = NULL; > const char *relative = NULL; > bool in_share; > >+ subdir_path = talloc_asprintf(talloc_tos(), >+ "%s/%s", >+ dirfsp->conn->connectpath, >+ dirfsp->fsp_name->base_name); >+ if (subdir_path == NULL) { >+ goto nomem; >+ } >+ > abs_target_canon = > canonicalize_absolute_path(talloc_tos(), > symlink->substitute_name); >@@ -766,8 +774,8 @@ NTSTATUS read_symlink_reparse( > goto nomem; > } > >- in_share = subdir_of(connectpath, >- strlen(connectpath), >+ in_share = subdir_of(subdir_path, >+ strlen(subdir_path), > abs_target_canon, > &relative); > if (in_share) { >-- >2.38.0 >
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:
vl
:
review+
Actions:
View
Attachments on
bug 15505
: 18194