1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-28 01:58:17 +03:00

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.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Ralph Boehme 2016-09-11 15:35:37 +02:00 committed by Jeremy Allison
parent 49c5e4fbce
commit b13b3c1105

View File

@ -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: "