Problem with reading file from VFS and Windows
idra at samba.org
Thu Feb 10 11:05:14 GMT 2005
On Thu, 2005-02-10 at 11:43 +0100, Marek Grac wrote:
> On Thu, 10 Feb 2005, Simo Sorce wrote:
> > On Thu, 2005-02-10 at 10:57 +0100, Marek Grac wrote:
> >> On Thu, 10 Feb 2005, Simo Sorce wrote:
> >>>> [*] problem in VFS (for example opening non-open fd) can break whole samba
> >>>> server [even shares which don't have anything with VFS]
> >>> I do not understand what you mean by: "(for example opening non-open
> >>> fd)", can you explain what's the problem and provide a sample code to
> >>> reproduce it?
> >> I have reported this bug, already. Oops, I found error in my mail, not
> >> opening but reading from non-open fd. Then most of the operations are not
> >> working even on the other shares.
> > CAn you give the bug id for bugzilla ?
seen that, and Jeremy's answer is right, you can't blame samba getting
confused if you mix system and own fd tables.
> > Can you give me a code example I can test?
> I will have to find it in somewhere in CVS [i will send it to you in
thanks, but the details you provided now are clear and I can say that it
is a module problem not a samba one.
The module must be safe and correct otherwise we not guarantee the rest
of samba will work.
> > Anyway reading from a non-open fd should just return an error.
> I remember that it occured when I was able to do some operations but I
> don't have several operations (pwrite?) rewritten so samba defaults where
> used. And because I have my own fd_table it crash.
In this case this is a module error, you must implement an opaque module
and implement all functions in this case. Your module must be the last
So use SMB_VFS_LAYER_OPAQUE and implement all functions (just return an
error for the fn's you do not want to implement at first, but I think we
rely an all operations to work properly in smbd.
P.S: I CCed back the list as I think the discussion have some value also
for other VFS module developers.
Simo Sorce - idra at samba.org
Samba Team - http://www.samba.org
Italian Site - http://samba.xsec.it
More information about the samba-technical