Bug 15307 - vfs_ceph incorrectly uses fsp_get_io_fd() instead of fsp_get_pathref_fd() in close and fstat
Summary: vfs_ceph incorrectly uses fsp_get_io_fd() instead of fsp_get_pathref_fd() in ...
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: File services (show other bugs)
Version: 4.17.5
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Jule Anger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-09 22:29 UTC by Jeremy Allison
Modified: 2023-03-09 09:22 UTC (History)
3 users (show)

See Also:


Attachments
git-am fix for 4.18.rcNext, 4.17.next. (2.98 KB, patch)
2023-02-13 20:43 UTC, Jeremy Allison
jra: review? (gd)
asn: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Allison 2023-02-09 22:29:26 UTC
From https://gitlab.com/samba-team/samba/-/merge_requests/2930

I was testing a share using the vfs_ceph module over smbclient. I could log into a share but not ls the root of the share. The samba logs lead me to look into the fds/fsps use and I was able to come up with the following fix:

Replace fsp_get_io_fd with fsp_get_pathref_fd as these calls do use pathref fsps. fsp_get_io_fd asserts that the fsp is not pathref and asserts (on a debug build) or returns -1 (non debug build).

Prior to these changes running ls on the root of the share failed. Logging from the failure case:
Comment 1 Jeremy Allison 2023-02-09 22:30:20 UTC
Have patch, need bugid.
Comment 2 Samba QA Contact 2023-02-13 20:05:06 UTC
This bug was referenced in samba master:

54a8da864071e28eb6297b872dcb57fb9b171f33
Comment 3 Jeremy Allison 2023-02-13 20:43:10 UTC
Created attachment 17758 [details]
git-am fix for 4.18.rcNext, 4.17.next.
Comment 4 Andreas Schneider 2023-02-14 07:18:24 UTC
Comment on attachment 17758 [details]
git-am fix for 4.18.rcNext, 4.17.next.

Looks fine for me.
Comment 5 Andreas Schneider 2023-02-14 07:18:55 UTC
Jule, please apply the patch to the relevant branches. Thanks!
Comment 6 Jule Anger 2023-02-15 13:15:10 UTC
Pushed to autobuild-v4-{18,17}-test.
Comment 7 Samba QA Contact 2023-02-15 14:22:06 UTC
This bug was referenced in samba v4-17-test:

0b8713e342c6b7eb58e19fc01c90a7182d843baf
Comment 8 Samba QA Contact 2023-02-15 14:23:02 UTC
This bug was referenced in samba v4-18-test:

82d7b2a142e4ab64a573f268457e8bbff697e6fd
Comment 9 Jule Anger 2023-02-15 15:13:27 UTC
Closing out bug report.

Thanks!
Comment 10 Samba QA Contact 2023-02-15 15:19:02 UTC
This bug was referenced in samba v4-18-stable (Release samba-4.18.0rc3):

82d7b2a142e4ab64a573f268457e8bbff697e6fd
Comment 11 Samba QA Contact 2023-03-09 09:22:36 UTC
This bug was referenced in samba v4-17-stable (Release samba-4.17.6):

0b8713e342c6b7eb58e19fc01c90a7182d843baf