This breaks VFS modules that return an opaque pointer, cast to a DIR * - such as vfs_scannedonly.c and potentially others. Patch to follow that removes the use of dirfd() from the samba code. This is related to bug 9777, which also has a patch to remove dirfd use from the vfs_dirsort module. Jeremy.
Created attachment 8760 [details] git-am fix for master and 4.0.x Patchset to remove all uses of dirfd() from the main Samba code. Jeremy.
Created attachment 8762 [details] git-am fix for master and 4.0.next. Updated - remove obsolete comment on sys_fdopendir().
Comment on attachment 8762 [details] git-am fix for master and 4.0.next. Please cherry-pick the patches from master.
Jeremy :)
Created attachment 8806 [details] git-am fix for 4.0.next.
Comment on attachment 8806 [details] git-am fix for 4.0.next. LGTM.
Just a quick comment: I would like bug 9822 to be understood before this goes in. The reporter's analysis points at the dirfd patchset. Unfortunately, I've not been able to work on this more yet.
Seems reasonable to me. Looking at #9822 does look like this broke something, but the reporter still hasn't provided a usable backtrace. I'll look at this bug also. Cheers, Jeremy.
Created attachment 8822 [details] Additional git-am fix that needs to be applied on top of the 4.0.x patch. This is the fix for bug #9822 that also need to be applied on top of the git-am fix for 4.0.x. Both fixes are required (or I can squash into one if the reviewer requests). Jeremy.
Created attachment 8829 [details] git-am fix for 4.0.next that went into master. Contains the "cherry picked from commit" references from master. Please +1 and let's get this into 4.0.next. Also contains the fix for 9822 as it logically belongs here. Jeremy.
Comment on attachment 8829 [details] git-am fix for 4.0.next that went into master. OpenDir_fsp() falls back to SMB_VFS_OPENDIR() if SMB_VFS_FDOPENDIR() fails with ENOSYS. Shouldn't dirp->fsp also be set in this case?
(In reply to comment #11) > Comment on attachment 8829 [details] > git-am fix for 4.0.next that went into master. > > OpenDir_fsp() falls back to SMB_VFS_OPENDIR() if SMB_VFS_FDOPENDIR() fails with > ENOSYS. Shouldn't dirp->fsp also be set in this case? Forget it, there's no fd to track in this case.
Comment on attachment 8829 [details] git-am fix for 4.0.next that went into master. Looks good.
Re-assigning to Karolin for inclusion in 4.0.next. Thanks ! Jeremy.
Pushed to autobuild-v4-0-test.
Pushed to v4-0-test. Closing out bug report. Thanks!
This issue was encountered in v3-6-stable branch as well, while testing vfs_glusterfs - https://lists.samba.org/archive/samba-technical/2013-May/092891.html and previous messages Requesting backport to v3-6-stable.
Created attachment 8942 [details] v3-6-test patch
Re-assigning to Karolin for inclusion in v3-6-test. Thanks ! Andreas.
Pushed to v3-6-test. Closing out bug report. Thanks!
Comment on attachment 8942 [details] v3-6-test patch LGTM