From 71a57596239e0c9ff307235e4777ffe2bcf92004 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Thu, 15 Oct 2020 19:50:14 +0200 Subject: [PATCH] smbd: base POSIX semantics of call_trans2findfirst() on SMB_FILENAME_POSIX_PATH flag We really want to apply POSIX semantics in this place whenever the client has enabled UNIX extensions, not only when using UNIX find info-levels. Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- source3/smbd/trans2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index c39d21da909..5a9ec8a467e 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -1784,7 +1784,7 @@ static bool smbd_dirptr_lanman2_mode_fn(TALLOC_CTX *ctx, bool ms_dfs_link = false; uint32_t mode = 0; - if (INFO_LEVEL_IS_UNIX(state->info_level)) { + if (smb_fname->flags & SMB_FILENAME_POSIX_PATH) { if (SMB_VFS_LSTAT(state->conn, smb_fname) != 0) { DEBUG(5,("smbd_dirptr_lanman2_mode_fn: " "Couldn't lstat [%s] (%s)\n",