Created attachment 10747 [details] success trace to Windows 7 (as server) See MS-SMB2 section 3.3.5.10 and compare with Frames 23/24 (failure to Samba 4.2rc4) and Frames 21/22 of the working trace (to Windows 7) If SMB2_CLOSE_FLAG_POSTQUERY_ATTRIB was set: CreationTime, LastAccessTime, LastWriteTime, ChangeTime, AllocationSize, EndofFile, and FileAttributes MUST be set to the values returned from the attribute query Found with the Microsoft Functional Test suite - createclose test s604
Created attachment 10748 [details] Failure trace to Samba 4.2-rc4
Created attachment 10753 [details] git-am fix for master and 4.2.0 Simple fix - looks like we were just reading the flags field from the wrong place in the packet. Can you test this please Steve ? Jermey.
Comment on attachment 10753 [details] git-am fix for master and 4.2.0 No, this patch is wrong :-(. We are reading the correct field. Need to understand why this is not getting the flags field correctly...
AHA ! *NOW* I understand.... This is a delete on close test. However, we do a stat/lstat call in the close handling *after* we've deleted the file, so can't get the data. We need to return the values from the stat from before the file gets deleted...
Created attachment 10757 [details] Raw patch for 4.2.0/master Steve, please check this works. If so I'll turn it into a proper git-am patchset.
Yes - JRA's patch fixed the bug
Created attachment 10758 [details] git-am fix for master. Patch I've sent to samba-technical. Please add 'Reviewed-by' on the list then I'll upload the cherry-pick for inclusion.
Created attachment 10761 [details] git-am fix for 4.2.0 Cherry picked from the code that went into master. Steve please +1 for 4.2.0.
Re-assigning to Karolin for inclusion in 4.2.0. Steve, let me know if you want this in 4.1.x, 4.0.x - I'm not currently planning to back-port.
Given that it does not appear to have any security implications and the relatively small differences between 4.2 and 4.1, just putting in 4.2 and mater is fine.
Pushed to autobuild-v4-2-test.
Pushed to v4-2-test. Closing out bug report. Thanks!