Bug 14714 - SMB2 Close returns unexpected timestamps
Summary: SMB2 Close returns unexpected timestamps
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: File services (show other bugs)
Version: unspecified
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-24 10:03 UTC by Ralph Böhme
Modified: 2021-06-01 07:26 UTC (History)
1 user (show)

See Also:


Attachments
Patch for 4.13 and 4.14 cherry-picked from master (5.80 KB, patch)
2021-05-25 07:43 UTC, Ralph Böhme
jra: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ralph Böhme 2021-05-24 10:03:05 UTC
Since 572d4e3a56eef00e29f93482daa21647af7310d0 SMB2 Close returns the UNIX epoch for all time fields if postqueryattrib is 0.

This is a regression introduced by 572d4e3a56eef00e29f93482daa21647af7310d0.

We're not initializing the timestamps correctly with SAMBA_UTIME_OMIT, so the new put_long_date_full_timespec() translates the 0 value to a valid NT time represting 1.1.1970.

Have fix, need bugnumber.
Comment 1 Samba QA Contact 2021-05-24 16:57:03 UTC
This bug was referenced in samba master:

ac9042ff4dc6c892764abd23a9445116ad40e62a
f96cc29711181b5237a5b92c4bfb5e75fe2a73b9
Comment 2 Ralph Böhme 2021-05-25 07:43:41 UTC
Created attachment 16624 [details]
Patch for 4.13 and 4.14 cherry-picked from master
Comment 3 Jeremy Allison 2021-05-25 16:51:27 UTC
LGTM. Re-assigning to Karolin for inclusion in 4.14.next, 4.13.next.
Comment 4 Karolin Seeger 2021-05-26 10:54:59 UTC
(In reply to Jeremy Allison from comment #3)
Pushed to autobuild-v4-{14,13}-test.
Comment 5 Samba QA Contact 2021-05-26 11:44:03 UTC
This bug was referenced in samba v4-13-test:

37233cbdf8fc95cd63f24419d8516e303cbbbbff
5d4bbaff8b62504f20074c08bc8f07093a9f52cc
Comment 6 Samba QA Contact 2021-05-26 12:46:03 UTC
This bug was referenced in samba v4-14-test:

94ba90fa7559fb3bb3c331a9c8703d1fa7c468cb
c58029aa27436114d5ed7f7b682e544f4d2542b3
Comment 7 Karolin Seeger 2021-05-27 09:21:40 UTC
Pushed to both branches.
Closing out bug report.
Comment 8 Samba QA Contact 2021-06-01 07:26:16 UTC
This bug was referenced in samba v4-14-stable (Release samba-4.14.5):

94ba90fa7559fb3bb3c331a9c8703d1fa7c468cb
c58029aa27436114d5ed7f7b682e544f4d2542b3