diff options
author | Ralph Boehme <slow@samba.org> | 2016-09-11 15:35:37 +0200 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2016-09-16 09:00:15 +0200 |
commit | 80e17c7c15413af1b9b0895979bd965d1f5bfa65 (patch) | |
tree | 7f470c4a0270e94bc9aa9e7a5c99ed68da8a4aa8 | |
parent | 44107d9d228617dedabbf0bd0961a82f4e88d078 (diff) | |
download | samba-80e17c7c15413af1b9b0895979bd965d1f5bfa65.tar.gz |
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)
-rw-r--r-- | source3/smbd/trans2.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 09392a3c2bb..e3de61e0d4d 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -5700,7 +5700,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; } } @@ -5761,7 +5762,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: " @@ -5807,7 +5808,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: " |