From: Volker Lendecke Date: Tue, 12 Jul 2022 15:48:25 +0000 (+0200) Subject: smbd: Take care of @GMT in SMB1's reply_ntcreate_and_X() X-Git-Tag: tevent-0.13.0~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9fc4659215ac6586003d43c1552e79915093fb58;p=thirdparty%2Fsamba.git smbd: Take care of @GMT in SMB1's reply_ntcreate_and_X() Next we want to avoid filename_convert() to take care of this. The SMB2 code has a proper TWRP token anyway, so let's push the @GMT-handling to the SMB1 code that will be converted to filename_convert_dirfsp(). Signed-off-by: Volker Lendecke Reviewed-by: Ralph Boehme --- diff --git a/source3/smbd/smb1_nttrans.c b/source3/smbd/smb1_nttrans.c index b39465c383f..2ada93bbfa2 100644 --- a/source3/smbd/smb1_nttrans.c +++ b/source3/smbd/smb1_nttrans.c @@ -535,6 +535,7 @@ void reply_ntcreate_and_X(struct smb_request *req) uint8_t oplock_granted = NO_OPLOCK_RETURN; struct case_semantics_state *case_state = NULL; uint32_t ucf_flags; + NTTIME twrp = 0; TALLOC_CTX *ctx = talloc_tos(); START_PROFILE(SMBntcreateX); @@ -624,8 +625,11 @@ void reply_ntcreate_and_X(struct smb_request *req) } ucf_flags = filename_create_ucf_flags(req, create_disposition); + if (ucf_flags & UCF_GMT_PATHNAME) { + extract_snapshot_token(fname, &twrp); + } status = filename_convert_dirfsp( - ctx, conn, fname, ucf_flags, 0, &dirfsp, &smb_fname); + ctx, conn, fname, ucf_flags, twrp, &dirfsp, &smb_fname); TALLOC_FREE(case_state);