CVS update: samba4/source/ntvfs

Jelmer Vernooij jelmer at
Sun Nov 30 21:21:53 GMT 2003

On Thu, Nov 27, 2003 at 01:37:44PM +0100, Stefan Metzmacher wrote about 'Re: CVS update: samba4/source/ntvfs':
> Jelmer Vernooij wrote:
> >Isn't that what the ntvfs_interface_version function is supposed to
> >be used for? A backend can check only the sizes of the structs it uses
> >and ignore the other ones.
> hmm, should we really let the module decide that?

> I think the module should be able to check the sizes and then decide 
> which funtions it want to register.
> But a module can also not check for sizes and just register it's 
> functions for an old samba version.
> And then we segfault. (tridge I know that segfaulting is good to find 
> bugs:-) but I think this is no bug! and we should check this)
> also we should check the the version in
> ntvfs_interface_version()
Even then, you shouldn't store the interface version in the ops
struct. Rather, the module should check the interface version itself
and then decide whether it wants to register.

> because if the module tries to test the sizes and pass the wrong struct 
> we'll segfault in the ntvfs_interface_version() if the struct has grown!
Wasn't the first element of the struct returned by
ntvfs_interface_version() the value of the sizeof() of that struct?


Jelmer Vernooij                                              <jelmer at>                   
Bugs in bugzilla: 28 

More information about the samba-technical mailing list