From: Ralph Boehme Date: Thu, 30 Apr 2020 13:17:11 +0000 (+0200) Subject: smbd: let canonicalize_snapshot_path() fill in struct smb_filename.twrp X-Git-Tag: ldb-2.2.0~693 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8a8fe887f54ad197be74d5e816da9e5efd745178;p=thirdparty%2Fsamba.git smbd: let canonicalize_snapshot_path() fill in struct smb_filename.twrp Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c index c80b0fde797..b038287aa22 100644 --- a/source3/smbd/filename.c +++ b/source3/smbd/filename.c @@ -370,6 +370,7 @@ static NTSTATUS canonicalize_snapshot_path(struct smb_filename *smb_fname, char *startp = strchr_m(smb_fname->base_name, '@'); char *endp = NULL; struct tm tm; + time_t t; NTSTATUS status; if (twrp != NULL) { @@ -393,6 +394,7 @@ static NTSTATUS canonicalize_snapshot_path(struct smb_filename *smb_fname, TALLOC_FREE(smb_fname->base_name); smb_fname->base_name = twrp_name; + unix_to_nt_time(&smb_fname->twrp, *twrp); return NT_STATUS_OK; } @@ -431,6 +433,10 @@ static NTSTATUS canonicalize_snapshot_path(struct smb_filename *smb_fname, return status; } + tm.tm_isdst = -1; + t = timegm(&tm); + unix_to_nt_time(&smb_fname->twrp, t); + return NT_STATUS_OK; }