1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

smbd: use (global) POSIX pathname state in non_widelink_open()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Ralph Boehme 2020-07-02 07:57:57 +02:00 committed by Jeremy Allison
parent afdeba8819
commit b6e40dbf9b

View File

@ -719,7 +719,7 @@ static int non_widelink_open(files_struct *fsp,
* BUG: https://bugzilla.samba.org/show_bug.cgi?id=12860
*/
if (saved_errno == ELOOP || saved_errno == ENOTDIR) {
if (fsp->posix_flags & FSP_POSIX_FLAGS_OPEN) {
if (fsp->fsp_name->flags & SMB_FILENAME_POSIX_PATH) {
/* Never follow symlinks on posix open. */
goto out;
}