Get Samba version or capability information from Windows

Corinna Vinschen corinna at
Fri Jan 18 14:44:46 GMT 2008

On Jan 18 14:41, Volker Lendecke wrote:
> On Fri, Jan 18, 2008 at 02:23:49PM +0100, Corinna Vinschen wrote:
> > 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>
> >   Date:   Fri Jan 18 11:08:17 2008 +0100
> Yes, git uses 160 bit hash values for all commits, there is
> no such thing as a revision number that you might know from
> for example svn. It is ok to take the first 64 bits of that
> revision, this should be unique enough.
> [...]
> That's where the build time and the Samba version string
> comes in. That partial git hash is the definitive answer
> that you might want for specific vendor branches etc.

Here's another question: Where would you get the git commit number and
date from, if the source tree from which you build is not under git
control?  For instance if you use the release source tar archive, or if
you use a vendor's source rpm.  Sorry if that's a dumb question.

> > 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).
> Well, how do you encode the "a" in 3.0.27a?

As in OpenSSL, no character is 0, 'a' is 1, 'b' is 2, etc.  See
<openssl/opensslv.h>.  Samba could use the same version number layout.
The data is completely available in include/version.h, afaics.

> Look at
> lib/version.c, feel free to make up an encoding you prefer.

Will do, thanks.

> > > Corinna, would you mind to code that up as a patch?
> > 
> > Sure, why not, but I might need some help with git.
> You might want to look at
> for a start. The people on the #samba-technical irc channel
> might also help.

Ok, thank you,

More information about the samba-technical mailing list