Since 4.14 we call openat_pathref_fsp() for every directory entry which in 4.16 and below still does a stat() vs fstat() dev/ino comparison. SInce the stat info in this case comes from SMB_VFS_READDIR(), as this is not implemented in shadow_copy2, the module can't update the inode number for the path based stat (provided via fstatat() in vfswrap_readdir()) so it won't match the subsequent fstat() which is handled by shadow_copy2. In master we now have SMB_VFS_FSTATAT() which is correctly implemented in shadow_copy2 including the inode update logic, so this bug doesn't exist in master (iirc we also removed the dev/ino stat vs fstat check from openat_pathref_fsp in master). But in 4.16 and below we have to implement readdir() in shadow_copy2. Have patch, need bugnumber.
This bug was referenced in samba master: f734e960eb7ad98808ad8757de51c51d3db86a2b ba9c5ba8ec54e72d68e3f753a5350afe0fb50a7c 9fa67ba8eeb6249d4b91b894e80eb1985c845314
Created attachment 17259 [details] Patch for 4.15 and 4.16 backported from master Just a minor conflict in tests.py...
We need to sort out the order of application of the patches in: https://bugzilla.samba.org/show_bug.cgi?id=15022 https://bugzilla.samba.org/show_bug.cgi?id=15038 and this patchset as they all mess with tests.py, and this patch conflicts if applied after the two above. I tested #15022 and #15038 applied in order, and they work, but this patch doesn't apply on top. I'll upload a new version modified to work on top of these (as we need all 3 of these patches for 4.16.next and 4.15.next).
Created attachment 17260 [details] Patch for 4.15 and 4.16 backported from master - on top of #15022, #15038 Fixed to apply on top of #15022, #15038.
Jule, once Ralph +1's the fix, can you apply the patches in: https://bugzilla.samba.org/show_bug.cgi?id=15022 https://bugzilla.samba.org/show_bug.cgi?id=15038 https://bugzilla.samba.org/show_bug.cgi?id=15035 in that order please !
Created attachment 17263 [details] Patch for 4.15 and 4.16 backported from master - on top of #15022, #15038 Missed one chunk in the backport of the first patch. This one should match what is in master.
Ping Ralph. Can we get the back-ports for: https://bugzilla.samba.org/show_bug.cgi?id=15022 https://bugzilla.samba.org/show_bug.cgi?id=15038 https://bugzilla.samba.org/show_bug.cgi?id=15035 reviewed and in for 4.15.next, 4.16.next ? They're already in master.
Reassigning to Jule for inclusion in 4.15 and 4.16. Beware of the ordering requirements! :)
Pushed to autobuild-v4-{16,15}-test.
This bug was referenced in samba v4-16-test: 829f203c2f3838d619e845d02d25c9443703ec4a d6b48ec3795bf4bb6b7665be6ce9009932f59db6 bf221a9b207dcd085171fbe8458e33a96a1d0869
This bug was referenced in samba v4-15-test: 4d4848e4faec551677fa0bb24c6ba1cbe4196c70 fbcbe7b96c52e1d6e6c030d7fc311d03b22ec3e9 a275f517628e86c4a9a1bcb1bb86921592f91b17
Closing out bug report. Thanks!
This bug was referenced in samba v4-15-stable (Release samba-4.15.7): 4d4848e4faec551677fa0bb24c6ba1cbe4196c70 fbcbe7b96c52e1d6e6c030d7fc311d03b22ec3e9 a275f517628e86c4a9a1bcb1bb86921592f91b17
This bug was referenced in samba v4-16-stable (Release samba-4.16.1): 829f203c2f3838d619e845d02d25c9443703ec4a d6b48ec3795bf4bb6b7665be6ce9009932f59db6 bf221a9b207dcd085171fbe8458e33a96a1d0869