directory path info in vfs readdir
Jeremy Allison
jra at samba.org
Fri Apr 7 15:26:03 GMT 2006
On Fri, Apr 07, 2006 at 10:32:35AM +0100, Philip de Nier wrote:
>
> >> The smbd version is 3.0.13-1.1-SUSE, on Suse 9.3, Linux
> >2.6.11.4-21.7-smp.
> >
> >This code has changed since that release. I'd suggest using the latest
> >version and seeing if the problem still occurs.
> >
> >Jeremy.
>
> I tried it with the latest version and the problem is still there.
>
> It seems the problem arises from Samba code initiating calls to the
> underlying file system via VFS without following the same route as calls
> initiated by client code. The issue I was experiencing arose when a Windows
> client was doing a "dir" on a non-existent directory and the Samba code at
> some point calls "scan_directory" in smbd/filename.c, which calls "OpenDir"
> in smbd/dir.c, which then gets routed to the VFS. This process does not use
> the code to create a new directory pointer, namely "dptr_create" in
> smbd/dir.c, and subsequently the connection struct is not updated with the
> directory path.
Ah I see. This isn't a problem, this is by design. The VFS will always
be called when smbd is calling into the filesystem on a connection, but
the semantics guarenteed are POSIX semantics, not Windows ones. So
long as we're always calling a VFS opendir before a VFS readdir then we're
behving consistently.
Jeremy.
More information about the samba-technical
mailing list