From 6e364c545384c5da4a0f0f0536c40394aa2e2a97 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Thu, 30 Apr 2020 15:24:44 +0200 Subject: smbd: strip @GMT token in canonicalize_snapshot_path() smbd and all previous-versions implementing VFS modules have been patched to work with struct smb_filename.NTTIME twrp, so we can now safely strip @GMT tokens from paths. This also means that "@GMT-something/foo" and "foo" will both come out as "foo", so we have to take care of the stat-cache now and change it to take and use an additional twrp arg. At the same time remove @GMT stripping from shadow_copy2. In theory this could be made a seperate commit, but due to the absolute path and pstripped logic, it felt too cumbersome to attempt this. Leaving the exercize of removing the now unneeded stripped logic to a future patchset. Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- source3/smbd/proto.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source3/smbd/proto.h') diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h index b0b6e2981c3..20b5c43f139 100644 --- a/source3/smbd/proto.h +++ b/source3/smbd/proto.h @@ -1169,12 +1169,14 @@ ssize_t message_push_string(uint8_t **outbuf, const char *str, int flags); void stat_cache_add( const char *full_orig_name, const char *translated_path, + NTTIME twrp, bool case_sensitive); bool stat_cache_lookup(connection_struct *conn, bool posix_paths, char **pp_name, char **pp_dirpath, char **pp_start, + NTTIME twrp, SMB_STRUCT_STAT *pst); void smbd_send_stat_cache_delete_message(struct messaging_context *msg_ctx, const char *name); -- cgit v1.2.1