Get Samba version or capability information from Windows

Corinna Vinschen corinna at vinschen.de
Fri Jan 18 13:23:49 GMT 2008


On Jan 18 09:16, Volker Lendecke wrote:
> On Thu, Jan 17, 2008 at 05:09:54PM -0500, David Collier-Brown wrote:
> >  I'd mildly reccomend a compact form of the first three of these, 
> > ending in a string version and date/time for human convenience.
> > 
> > struct smb_extra_info
> >   {
> >    uint32_t magic_number;	/* "SmBa" or something */
> >    uint64_t samba_build_ver;	/* SVN or Git version number. */
> >    time_t   samba_build_time;	/* The time of the commit. */
> >    char     samba_version[32]; /* String version and date/time */
> >   };
> > 
> >  This assumes that you only need 4-byte alignment if you want to
> > grab the binary build_ver and build_time, of course.
> 
> Sounds ok, although I don't know yet where we should get the
> build time from. But that should be solvable.

Apart from that, how does a git version number look like?  Is that
really a 64 bit number?  I'm more or less git illiterate so far. 
When I look into the log, I see commit numbers as:

  commit 3fa0cf3fe5f819f6e76df6f7cef3bb4e1c307a52
  Author: Volker Lendecke <vl at samba.org>
  Date:   Fri Jan 18 11:08:17 2008 +0100

The commit number looks like a 160 bit value.  Additionally the commit
numbers don't seem to be ordered which would be rather bad for
comparisons.

Personally I'd rather have a binary representation of the samba
version number (like 0x03020001 or something, similar to the way
the OpenSSL version number is defined).

> Corinna, would you mind to code that up as a patch?

Sure, why not, but I might need some help with git.


Corinna


More information about the samba-technical mailing list