]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: fullpath based on fsp->fsp_name may contain an @GMT token
authorRalph Boehme <slow@samba.org>
Fri, 1 May 2020 14:38:04 +0000 (16:38 +0200)
committerJeremy Allison <jra@samba.org>
Tue, 5 May 2020 19:18:41 +0000 (19:18 +0000)
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 <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/smb2_query_directory.c

index 4da051e18ebe281a918ea28e72c66518c10111dd..562c8f537ee34b81b1b70c08df6e313c83899d24 100644 (file)
@@ -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,