Get Samba version or capability information from Windows

Corinna Vinschen corinna at vinschen.de
Thu Jan 17 18:06:52 GMT 2008


On Jan 17 18:45, Volker Lendecke wrote:
> On Thu, Jan 17, 2008 at 06:35:26PM +0100, Corinna Vinschen wrote:
> > That might be a teeny little bit too detailed ;)
> > 
> > I thought about something like a well-defined structure, along these lines:
> > 
> >   struct smb_extra_info
> >   {
> >     uint32_t magic_number;	/* "SmBa" or something */
> >     uint8_t  samba_version[4];  /* { 3, 2, 0, 'a' } */
> >     uint32_t feature_flags;
> >     uint32_t bugfix_flags;
> >     [...]
> >   };
> 
> Hmmm. This would mean that we have to define features
> and/or bugfixes. This is a bit too volatile for my taste. We

That was just a first idea.  Maybe there is no need for a feature
flag on the file system level, given the existance of
SMB_FS_ATTRIBUTE_INFORMATION.  But bugfix flags would be very helpful.
This would not be changed very often, only if the behaviour changes in a
major way on the client level.  For instance, something like the fact
that right now the number of links to a dir is set to st_nlink - 1, but
in a later version it's set to st_nlink or to 1, would call for such a
flag.  Or perhaps if stuff like the inode number of symlinks change (see
https://bugzilla.samba.org/show_bug.cgi?id=5209)

> announce quite a lot of our features via different means
> already, although not all of these bits might be accessible
> from the NT user space.
> 
> Could you live with what is defined in samba_version_string()?

Maybe, but that's much less reliable, isn't it?  The version number and
earlier/later dependencies would have to be calculated from an arbitrary
version string.  There's also no magic which would allow to identify
that this is a Samba server at all.  Sure, it would be better than
today, but still...


Corinna


More information about the samba-technical mailing list