From: Jeremy Allison Date: Mon, 18 Mar 2019 21:52:26 +0000 (-0700) Subject: s3: smbd: Clarify POSIX name handling in SMB2 get/setinfo calls. X-Git-Tag: talloc-2.2.0~29 X-Git-Url: http://git.samba.org/?a=commitdiff_plain;h=944c577a96fd58634f21bda75deb52a4fb9a6d8e;p=samba.git s3: smbd: Clarify POSIX name handling in SMB2 get/setinfo calls. We should never be looking at the info level here, the create call will have set the correct POSIX flag on the smb_filename struct. Signed-off-by: Jeremy Allison Reviewed-by: Volker Lendecke Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Tue Mar 19 22:55:11 UTC 2019 on sn-devel-144 --- diff --git a/source3/smbd/smb2_getinfo.c b/source3/smbd/smb2_getinfo.c index 29625fc1ba7..cd92db18619 100644 --- a/source3/smbd/smb2_getinfo.c +++ b/source3/smbd/smb2_getinfo.c @@ -332,7 +332,7 @@ static struct tevent_req *smbd_smb2_getinfo_send(TALLOC_CTX *mem_ctx, * to do this call. JRA. */ - if (INFO_LEVEL_IS_UNIX(file_info_level)) { + if (fsp->fsp_name->flags & SMB_FILENAME_POSIX_PATH) { /* Always do lstat for UNIX calls. */ if (SMB_VFS_LSTAT(conn, fsp->fsp_name)) { DEBUG(3,("smbd_smb2_getinfo_send: " diff --git a/source3/smbd/smb2_setinfo.c b/source3/smbd/smb2_setinfo.c index b19cbb150a7..92e06f8c7d2 100644 --- a/source3/smbd/smb2_setinfo.c +++ b/source3/smbd/smb2_setinfo.c @@ -409,7 +409,7 @@ static struct tevent_req *smbd_smb2_setinfo_send(TALLOC_CTX *mem_ctx, * handle (returned from an NT SMB). NT5.0 seems * to do this call. JRA. */ - if (INFO_LEVEL_IS_UNIX(file_info_level)) { + if (fsp->fsp_name->flags & SMB_FILENAME_POSIX_PATH) { /* Always do lstat for UNIX calls. */ if (SMB_VFS_LSTAT(conn, fsp->fsp_name)) { DEBUG(3,("smbd_smb2_setinfo_send: "