The Samba-Bugzilla – Attachment 12458 Details for
Bug 12256
In call_trans2qfilepathinfo we call stat() instead of lstat() in POSIX paths context
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for 4.4 and 4.5 cherry-picked from master
v44,45-bug12256.patch (text/plain), 1.87 KB, created by
Ralph Böhme
on 2016-09-12 20:03:05 UTC
(
hide
)
Description:
Patch for 4.4 and 4.5 cherry-picked from master
Filename:
MIME Type:
Creator:
Ralph Böhme
Created:
2016-09-12 20:03:05 UTC
Size:
1.87 KB
patch
obsolete
>From 10527a360abeb6599befc744204014aa7398e22a Mon Sep 17 00:00:00 2001 >From: Ralph Boehme <slow@samba.org> >Date: Sun, 11 Sep 2016 15:35:37 +0200 >Subject: [PATCH] s3/smbd: in call_trans2qfilepathinfo call lstat when dealing > with posix pathnames > >This might be an info level SMB_INFO_QUERY_ALL_EAS which is not covered >by INFO_LEVEL_IS_UNIX(). If smb_fname is a symlink we would then stat it >in POSIX context. > >Bug: https://bugzilla.samba.org/show_bug.cgi?id=12256 > >Signed-off-by: Ralph Boehme <slow@samba.org> >Reviewed-by: Jeremy Allison <jra@samba.org> >(cherry picked from commit b13b3c11054f918f18841186a6efc5dedd2ffd66) >--- > source3/smbd/trans2.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > >diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c >index 1775316..a01bb81 100644 >--- a/source3/smbd/trans2.c >+++ b/source3/smbd/trans2.c >@@ -5767,7 +5767,8 @@ static void call_trans2qfilepathinfo(connection_struct *conn, > } > if (info_level == SMB_QUERY_FILE_UNIX_BASIC || > info_level == SMB_QUERY_FILE_UNIX_INFO2 || >- info_level == SMB_QUERY_FILE_UNIX_LINK) { >+ info_level == SMB_QUERY_FILE_UNIX_LINK || >+ req->posix_pathnames) { > ucf_flags |= UCF_UNIX_NAME_LOOKUP; > } > } >@@ -5831,7 +5832,7 @@ static void call_trans2qfilepathinfo(connection_struct *conn, > return; > } > >- if (INFO_LEVEL_IS_UNIX(info_level)) { >+ if (INFO_LEVEL_IS_UNIX(info_level) || req->posix_pathnames) { > /* Always do lstat for UNIX calls. */ > if (SMB_VFS_LSTAT(conn, smb_fname_base) != 0) { > DEBUG(3,("call_trans2qfilepathinfo: " >@@ -5877,7 +5878,7 @@ static void call_trans2qfilepathinfo(connection_struct *conn, > } > } > >- if (INFO_LEVEL_IS_UNIX(info_level)) { >+ if (INFO_LEVEL_IS_UNIX(info_level) || req->posix_pathnames) { > /* Always do lstat for UNIX calls. */ > if (SMB_VFS_LSTAT(conn, smb_fname)) { > DEBUG(3,("call_trans2qfilepathinfo: " >-- >2.7.4 >
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:
jra
:
review+
Actions:
View
Attachments on
bug 12256
: 12458