Bug 14756 - vfs_shadow_copy2 fixinodes not correctly updating inode numbers
Summary: vfs_shadow_copy2 fixinodes not correctly updating inode numbers
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: VFS Modules (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-07-14 06:04 UTC by Ralph Böhme
Modified: 2021-08-24 13:25 UTC (History)
1 user (show)

See Also:


Attachments
Patch for 4.14 cherry-picked from master with additional patch (23.86 KB, patch)
2021-07-28 15:51 UTC, Ralph Böhme
no flags Details
Patch for 4.14 cherry-picked from master with additional patch (23.85 KB, patch)
2021-08-02 20:31 UTC, Jeremy Allison
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ralph Böhme 2021-07-14 06:04:59 UTC
For reentrant VFS calls where the incoming pathname refers to a file in a snapshot, the function convert_sbuf() which implements the logic behind shadow:fixinodes isn't called.
Comment 1 Samba QA Contact 2021-07-14 08:59:03 UTC
This bug was referenced in samba master:

03e36502f450d14656a824b36c33607ff418f0bf
40cf129abb51fa18a3bb6553da9c544f4d2d1f14
18a30d939e6f7d49300f235385953412f9e971b9
2c9ae4b78cd0d5a3686e79a7497fd3da9f87a307
b32e56d6eb29bfb5f368602edbc10d4b8bc9b4f0
745ded9afe12fda6d45638097a32b01122748649
0a0b438b8ab534eeb552a58ad72a714988e84d89
3aabc9825ca108641c2becf322fa0bd90ea18424
4a7e483c516cf2b9767919a764f05c43f4620cd7
c7d6745858f2efdd24ed6fd353ec5ece898033fa
Comment 2 Ralph Böhme 2021-07-28 15:51:09 UTC
Created attachment 16702 [details]
Patch for 4.14 cherry-picked from master with additional patch

Backport from master. Needed an additional patch, cf 7/8.

Please remember to add your signed-off to 7/8 if you're happy with the patch. Thanks!
Comment 3 Ralph Böhme 2021-07-28 16:26:54 UTC
Fwiw, not backporting this to 4.13 as the tests won't work there due to the lack of the dev/ino path/handle check in openat_pathref_fsp().

I think the fix itself is correct even for 4.13, but without the test to prove this I'd much rather keep 4.13 unchanged/broken and 4.14 and 4.15 fixed.
Comment 4 Jeremy Allison 2021-08-02 20:31:25 UTC
Created attachment 16708 [details]
Patch for 4.14 cherry-picked from master with additional patch

With my RB+.
Comment 5 Jeremy Allison 2021-08-02 20:31:49 UTC
Re-assigning to Karolin for inclusion in 4.14.next.
Comment 6 Jeremy Allison 2021-08-02 20:31:49 UTC
Re-assigning to Karolin for inclusion in 4.14.next.
Comment 7 Karolin Seeger 2021-08-12 11:20:14 UTC
(In reply to Jeremy Allison from comment #6)
Pushed to autobuild-v4-14-test.
Comment 8 Samba QA Contact 2021-08-17 10:08:05 UTC
This bug was referenced in samba v4-14-test:

e12c92d0175ea8a0057e9bc6b01ad65ce9153d84
93383852f0dec537e2f9b062f113c6f5747a80b9
a2ac4ee3d71480b3fc15b6a2e6308bb467b14e6b
5ae4300a36b63de302af174a8fc6bd29dbecac82
9d6d585ca00f7d001932fab8fc16b6a72ec3ec89
262d09c511a66562f397af099cfdef588813d1ab
8222ff1110c3ff506e3153b3294f2979206cdbfd
3228383d8ae56d53dd8d726eec8e81353b988624
Comment 9 Karolin Seeger 2021-08-17 11:26:19 UTC
Pushed to v4-14-test.
Closing out bug report.

Thanks!
Comment 10 Samba QA Contact 2021-08-24 13:25:47 UTC
This bug was referenced in samba v4-14-stable (Release samba-4.14.7):

e12c92d0175ea8a0057e9bc6b01ad65ce9153d84
93383852f0dec537e2f9b062f113c6f5747a80b9
a2ac4ee3d71480b3fc15b6a2e6308bb467b14e6b
5ae4300a36b63de302af174a8fc6bd29dbecac82
9d6d585ca00f7d001932fab8fc16b6a72ec3ec89
262d09c511a66562f397af099cfdef588813d1ab
8222ff1110c3ff506e3153b3294f2979206cdbfd
3228383d8ae56d53dd8d726eec8e81353b988624