From 64a3a31861d2a742b188723b0f91f2d4ea06eb15 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Fri, 1 May 2020 16:38:04 +0200 Subject: [PATCH] smbd: fullpath based on fsp->fsp_name may contain an @GMT token This ensure unix_convert() calls canonicalize_snapshot_path() on the path to process the @GMT token, so smb_fname->twrp is filled in with the converted time value of the @GMT token. When canonicalize_snapshot_path() starts actually stripping off @GMT tokens, we can remove this again. Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- source3/smbd/smb2_query_directory.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source3/smbd/smb2_query_directory.c b/source3/smbd/smb2_query_directory.c index 4da051e18eb..562c8f537ee 100644 --- a/source3/smbd/smb2_query_directory.c +++ b/source3/smbd/smb2_query_directory.c @@ -421,6 +421,11 @@ static struct tevent_req *smbd_smb2_query_directory_send(TALLOC_CTX *mem_ctx, } fullpath = tmp; } + + if (fsp->fsp_name->twrp != 0) { + ucf_flags |= UCF_GMT_PATHNAME; + } + status = filename_convert(state, conn, fullpath, -- 2.47.3