From: Jeremy Allison Date: Mon, 4 May 2020 19:53:21 +0000 (-0700) Subject: smbd: Update description of canonicalize_snapshot_path(). X-Git-Tag: ldb-2.2.0~653 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8019b3d0af2eb9a309b2b7b7055fe3ddbd645728;p=thirdparty%2Fsamba.git smbd: Update description of canonicalize_snapshot_path(). Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c index dd018c0962f..174b7b97dc3 100644 --- a/source3/smbd/filename.c +++ b/source3/smbd/filename.c @@ -349,19 +349,17 @@ static NTSTATUS rearrange_snapshot_path(struct smb_filename *smb_fname, } /* - * Canonicalize any incoming pathname potentially containining - * a @GMT-token into a path that looks like: + * Strip a valid @GMT-token from any incoming filename path, + * adding any NTTIME encoded in the pathname into the + * twrp field of the passed in smb_fname. * - * @GMT-YYYY-MM-DD-HH-MM-SS/path/name/components/last_component + * Valid @GMT-tokens look like @GMT-YYYY-MM-DD-HH-MM-SS + * at the *start* of a pathname component. * - * Leaves single path @GMT-token -component alone: + * If twrp is passed in then smb_fname->twrp is set to that + * value, and the @GMT-token part of the filename is removed + * and does not change the stored smb_fname->twrp. * - * @GMT-YYYY-MM-DD-HH-MM-SS -> @GMT-YYYY-MM-DD-HH-MM-SS - * - * Eventually when struct smb_filename is updated and the VFS - * ABI is changed this will remove the @GMT-YYYY-MM-DD-HH-MM-SS - * and store in the struct smb_filename as a struct timeval field - * instead. */ NTSTATUS canonicalize_snapshot_path(struct smb_filename *smb_fname,