]> git.ipfire.org Git - thirdparty/samba.git/commit
s3:lib: round itime to NTTIME resolution in make_file_id_from_itime()
authorRalph Boehme <slow@samba.org>
Mon, 9 Sep 2019 09:12:08 +0000 (11:12 +0200)
committerRalph Boehme <slow@samba.org>
Tue, 10 Sep 2019 19:05:29 +0000 (19:05 +0000)
commit84abeaa60ffced276da2b28b8add6efaa6da5ca6
tree299e34b27e0cdf38e4f8c4318121989c1894d520
parent5403bb22e6cb39baf6dc1b91558744d41e9f6f64
s3:lib: round itime to NTTIME resolution in make_file_id_from_itime()

The rounding is needed because when a file is created via eg an SMB2 CREATE
request, we need to calculate the correct File-ID for the QFID Create-Context or
for a subsequent GETINFO SMB request on the same file-handle.

Any later metadata request that received the File-ID will do so by going through
dos_mode() -> ... -> parse_dos_attribute_blob(), where the File-ID will be
calculated from the on-disk itime which has NTTIME resolution.

As long as that is the only available itime backend, I'm rounding itime inside
make_file_id_from_itime(), not in the callers.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14121

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source3/lib/file_id.c